Member Junction
    Preparing search index...

    The GraphQLProviderConfigData class is used to configure the GraphQLDataProvider. It is passed to the Config method of the GraphQLDataProvider

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • token: string

        Token is the JWT token that is used to authenticate the user with the server

      • url: string

        the URL to the GraphQL endpoint

      • wsurl: string

        the URL to the GraphQL websocket endpoint. This is used for subscriptions, if you are not using subscriptions, you can pass in a blank string for this

      • refreshTokenFunction: RefreshTokenFunction

        is a function that can be called by the GraphQLDataProvider whenever it receives an exception that the JWT it has already is expired

      • OptionalMJCoreSchemaName: string

        the name of the MJ Core schema, if it is not the default name of __mj

      • OptionalincludeSchemas: string[]

        optional, an array of schema names to include in the metadata. If not passed, all schemas are included

      • OptionalexcludeSchemas: string[]

        optional, an array of schema names to exclude from the metadata. If not passed, no schemas are excluded

      • OptionalmjAPIKey: string

        optional, a shared secret key that is static and provided by the publisher of the MJAPI server.

      • OptionaluserAPIKey: string

        optional, a user-specific API key (mj_sk_* format) for authenticating as a specific user

      • OptionalonAuthenticationError: AuthenticationErrorCallback

        optional callback invoked when token refresh fails irrecoverably

      Returns GraphQLProviderConfigData

    Accessors

    • get Data(): D

      Returns D

    • get ExcludeSchemas(): string[]

      Returns string[]

    • get IgnoreExistingMetadata(): boolean

      Returns boolean

    • get IncludeSchemas(): string[]

      Returns string[]

    • get MJAPIKey(): string

      This optional parameter is used when using a shared secret key that is static and provided by the publisher of the MJAPI server. Providing this value will result in a special header x-mj-api-key being set with this value in the HTTP request to the server. This is useful when the server is configured to require this key for certain requests.

      WARNING: This should NEVER BE USED IN A CLIENT APP like a browser. The only suitable use for this is if you are using GraphQLDataProvider on the server side from another MJAPI, or some other secure computing environment where the key can be kept secure.

      Returns string

    • set MJAPIKey(key: string): void

      Parameters

      • key: string

      Returns void

    • get MJCoreSchemaName(): string

      Returns string

    • get RefreshTokenFunction(): RefreshTokenFunction

      RefreshTokenFunction is a function that can be called by the GraphQLDataProvider whenever it receives an exception that the JWT it has already is expired

      Returns RefreshTokenFunction

    • get UserAPIKey(): string

      This optional parameter is used when authenticating with a MemberJunction user API key (format: mj_sk_*). When provided, it will be sent in the X-API-Key header. This authenticates as the specific user who owns the API key.

      Unlike MJAPIKey (system key), this is a user-specific key that can be used for automated access on behalf of a user. Use this when you want to make API calls as a specific user without requiring OAuth authentication.

      Returns string

    • set UserAPIKey(key: string): void

      Parameters

      • key: string

      Returns void