GraphQLSwift / Graphiti

The Swift GraphQL Schema framework for macOS and Linux
MIT License
531 stars 67 forks source link

Schema validation rules #105

Closed alexsteinerde closed 1 year ago

alexsteinerde commented 1 year ago

This allows to specify custom validation rules that will be executed when a query is run. The logic already existed in GraphQL but wasn't exposed in Graphiti.

Use-Cases: E.g. disabling schema introspection in production (also done via validations in JS https://github.com/helfer/graphql-disable-introspection/blob/master/index.js). We already had a short discussion about this over at the GraphQL repo: https://github.com/GraphQLSwift/GraphQL/issues/122

Discussions:

Feedback and change requests are welcome.

alexsteinerde commented 1 year ago

I changed the points as discussed. Feel free to comment on any other issues.