Provider
This page describes APIs that FabrixProvider
has.
url
The GraphQL API endpoint to make requests to by fabrix.
componentRegistry
The prop to provide a component registry.
serverSchema
GraphQL schema of the server. This prop accepts a string or GraphQLSchema
type.
Usually, you don’t need to provide this prop because Fabrix fetches the schema from the server automatically. However, if you want to provide the schema manually, you can do so with this prop.
prependExchanges
Fabrix internally uses urql to make requests to the GraphQL API, and FabrixProvider
has a prop to prepend exchanges (prependExchanges
) to the urql client.
The minimum implementation of urql exchange to set authentication header from your environment variable for each request is as follow:
To customize exchanges, see more at authoring exchanges in urql documents.