FRAGMENT publishes SDKs in:
The SDKs are open-source, implement authentication, and come with predefined GraphQL queries to help you get started.
Install the SDK for your language:
npm install --save @fragment-dev/node-clientEach SDK's README covers initialization, query generation, and usage:
To create an SDK in a language not listed above:
Use the FRAGMENT CLI to generate GraphQL queries from your Schema:
fragment get-schema \
--output=schema.jsonc &&\
fragment gen-graphql \
--path=schema.jsonc \
--output=queries.graphqlLearn about the different options you can provide to gen-graphql in its reference section.
Generate a type-safe SDK using a GraphQL codegen tool for your language. Provide the FRAGMENT API GraphQL schema as input.
Implement authentication and error handling.