GraphQL Mesh v0 documentation (superseded by v1): GraphQL Mesh allows you to use Persisted Operations approach
Persisted operations is a mechanism for preventing the execution of arbitrary GraphQL operation
documents. By default, the persisted operations plugin follows the
the APQ Specification
for SENDING hashes to the server.
You have to define your operations in your configuration file like below;
documents: ./documents/*.graphql
Then GraphQL Mesh will generate a persisted operations map under .mesh artifacts as
persisted_operations.json like below;
persistedOperations: # Whether to allow execution of arbitrary GraphQL operations aside from persisted operations. allowArbitraryOperations: false; # Whether to skip validation of the persisted operation skipDocumentValidation: false; # Customize error messages customErrors: # Error message to return when the operation is not found notFound: 'PersistedQueryNotFound' # Error to be thrown when rejecting non-persisted operations persistedQueryOnly?: string; # Error to be thrown when the extraction of the persisted operation id failed keyNotFound?: string;
This site uses cookies for analytics and improving your experience.