Add a GraphQL Data Source (Classic)

Adding a GraphQL data source tells Operations Hub where your data lives and how it should request it.

Before you begin



About this task

When you add a GraphQL data source in Operations Hub, you are configuring where the GraphQL API is hosted and how Operations Hub should communicate with it.

Operations Hub uses a REST-based connection model to communicate with GraphQL endpoints.

Procedure

  1. To enable the REST connection, provide these details:
    Field Name Description
    Base URL Enter the endpoint URL of the GraphQL data source.

    This is where Operations Hub will send your GraphQL queries.

    REST Authentication Required If the check box is selected, Operations Hub will apply authentication when sending requests to the GraphQL data source. For additional settings, refer to authentication types.

    You can clear the check box if the data source does not require credentials (suitable for open/public endpoint).

    Ignore TLS/SSL If the check box is selected, Operations Hub will bypass certificate validation. Useful during testing or when working with self-signed certificates.

    It is recommended to clear the check box in production environments.

    Certificate Required Not commonly required for most GraphQL APIs.
    If the check box is selected, GraphQL data source requires a client certificate for secure access. Provide the following details as necessary:
    • Choose Certificate: You can upload a certificate from your machine.
    • Auth Certificate: For OAuth-based connections, upload a specific certificate file for authentication. Requires Auth URL to be specified.
    • Use Data Source Certificate: Alternatively, you can select this check box if you want Operations Hub to use a certificate associated with the data source.
    Note:
    You can use certificates only in the base-64-encoded format. A DER-encoded certificate is not supported.
Authentication Types:
  1. When REST Authentication Required is enabled, select an Auth Type to define how Operations Hub should authenticate with the GraphQL data source.
    Available options:
    Field Name Description
    Basic Auth Use this if the data source requires basic HTTP authentication.

    Provide a Username and Password to protect your GraphQL endpoint.

    Bearer Token Use this if the data source requires an access token to authorize requests.

    Enter an Auth Token. This is the access key required to authenticate the APIs. The access key is included in the request header.

    OAuth This option provides a more dynamic and secure way to authenticate.

    For additional settings, refer to OAuth-based authentication.

OAuth-based Authentication:
  1. If OAuth is selected as the authentication type, provide the following details:
    The authentication URL, Client Id, and Secret are used to connect to the OAuth server that issues access tokens. Operations Hub uses these values to retrieve a token before executing a GraphQL query.
    Field Name Description
    Auth URL Enter the endpoint URL of the authentication server.
    Auth Client Id Enter the client identifier issued during the application registration process.
    Auth Client Secret Enter the client secret issued during the application registration process.
    Test Test the connection to verify the configuration.
    Selecting Auth Grant Type:
    • Client Credentials: Use this option for machine-to-machine communication where no user login is needed. Operations Hub uses the Auth Client Id and Auth Client Secret to obtain a token from the Auth URL.
    • Password: Use this option if the GraphQL data source requires user-level authentication to obtain an OAuth token.

      You must enter a Username and Password.

  2. Save the GraphQL data source record.

What to do next

Create GraphQL Query (Classic)