Managing GraphQL endpoints in API Gateway

Use this topic to add and configure a GraphQL endpoint in a Non-Infor API Suite in API Gateway. After you configure the endpoint, you can associate a GraphQL schema and use GraphQL Playground to run GraphQL queries.

To complete these tasks, you require the IONAPI-Administrator role.

Reviewing prerequisites

Before you configure a GraphQL endpoint, ensure that you have:

  • The IONAPI-Administrator role in API Gateway.
  • Access to a Non-Infor API Suite.
  • A valid GraphQL endpoint URL.
  • A GraphQL schema file in .graphql format or a GraphQL endpoint that supports schema introspection.

Adding a GraphQL endpoint

Add a GraphQL endpoint to expose the GraphQL API through API Gateway.

  1. Sign in to API Gateway.
  2. Select Available API.
  3. Select a Non-Infor API Suite or create a new suite.
  4. Select Add Endpoint.
  5. Specify the endpoint information.
    • Endpoint URL: Specify the full GraphQL endpoint URL, including the protocol.
    • Target Description: Specify a description of the GraphQL API.
    • Proxy Context: Specify a unique identifier to expose the GraphQL endpoint.
  6. Select the required authentication method.
  7. Select Save.

Adding a GraphQL schema

Associate a GraphQL schema with the GraphQL endpoint.

  1. Select the GraphQL endpoint.
  2. Select the Documentation tab.
  3. Select Add Documentation.
  4. Specify a documentation name.
  5. Add the GraphQL schema.
    • Upload a GraphQL schema file: Select GraphQL Schema File, select Upload, select the .graphql file, and select Save.
    • Retrieve the schema by using introspection: Select GraphQL Schema, specify the introspection URL if prompted, and select Save.
    Note:  Schema introspection requires the GraphQL endpoint to support introspection.

Downloading a GraphQL schema

Download the associated GraphQL schema file.

  1. Select the GraphQL endpoint.
  2. Select the Documentation tab.
  3. Select Download Schema.

Switching the documentation type

Change the documentation format for the GraphQL endpoint.

  1. Select the GraphQL endpoint.
  2. Select the option to edit the endpoint.
  3. In the endpoint documentation section, select a different documentation format.
  4. Upload the required documentation file.
  5. Select Save.

Understanding schema validation and behavior

Schema validation: When you upload a GraphQL schema, API Gateway validates the schema format. If errors exist, the system displays validation messages.

Schema updates: When you upload an updated schema, GraphQL Playground reflects the changes. Refresh active queries if required.

Authentication: Queries run in GraphQL Playground use the authentication configuration defined for the endpoint.

Performance: GraphQL supports deeply nested queries. Monitor query complexity to prevent performance issues.

Browser compatibility: GraphQL Playground requires a modern browser.

Reviewing limitations and considerations

  • GraphQL Playground is available only for Non-Infor API Suites.
  • Schema files must be in valid GraphQL Schema Definition Language (SDL) format.
  • The maximum schema file size is determined by the API Gateway upload limit (4 MB).
  • GraphQL APIs are not supported in API metadata.