Token is the JWT token that is used to authenticate the user with the server
the URL to the GraphQL endpoint
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
is a function that can be called by the GraphQLDataProvider whenever it receives an exception that the JWT it has already is expired
OptionalMJCoreSchemaName: stringthe 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: stringoptional, a shared secret key that is static and provided by the publisher of the MJAPI server.
OptionaluserAPIKey: stringoptional, a user-specific API key (mj_sk_* format) for authenticating as a specific user
OptionalonAuthenticationError: AuthenticationErrorCallbackoptional callback invoked when token refresh fails irrecoverably
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.
Optional callback invoked when token refresh fails irrecoverably. Use this to notify the user and force re-authentication (e.g., logout and redirect to login).
RefreshTokenFunction is a function that can be called by the GraphQLDataProvider whenever it receives an exception that the JWT it has already is expired
Token is the JWT token that is used to authenticate the user with the server
URL is the URL to the GraphQL endpoint
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.
WSURL is 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
The GraphQLProviderConfigData class is used to configure the GraphQLDataProvider. It is passed to the Config method of the GraphQLDataProvider