/api/graphql once you add its route files (see Enable GraphQL). You can customize this URL by specifying routes in your FrogBot config.
The labels you provide for your Collections are used to name the GraphQL types that are created to correspond to your config. Special characters and spaces are removed.
GraphQL Clients
You can use any GraphQL client with FrogBot’s GraphQL endpoint. Here are a few popular packages:graphql-request- a very lightweight GraphQL client@apollo/client- an industry-standard GraphQL client with lots of nice features
GraphQL Options
At the top of your FrogBot Config you can define all the options to manage GraphQL.Collections
Everything that can be done to a Collection via the REST or Local API can be done with GraphQL (outside of uploading files, which is REST-only). If you have a collection as follows:
And the following mutations:
GraphQL Playground
Once you add the playground route (see Enable GraphQL), GraphQL Playground is available in development and disabled in production. You can enable it in production by passinggraphQL.disablePlaygroundInProduction a false setting in the main FrogBot Config.
You can even log in using the login[collection-singular-label-here] mutation to use the Playground as an authenticated user.
Custom Validation Rules
You can add custom validation rules to your GraphQL API by defining avalidationRules function in your FrogBot Config. This function should return an array of Validation Rules that will be applied to all incoming queries and mutations.
graphQL to buildConfig in your FrogBot config.
Query complexity limits
FrogBot comes with a built-in query complexity limiter to prevent abusive queries from slowing down your server.Field complexity
You can define custom complexity forrelationship, upload and join type fields. This is useful if you want to assign a higher complexity to a field that is more expensive to resolve. This can help prevent users from running queries that are too complex.