You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to add some custom validation rules in addition to the default graphql.specified_rules. Unless I'm mistaken, the only way to do so is to manually call validate with the new rules, which means that I basically have to duplicate all the code inside of async def graphql, and change the validation step in order to pass in my custom rules. Is it possible instead to just allow clients to pass the rules they want to use into the top-level graphql call?
The text was updated successfully, but these errors were encountered:
As far as I see, you really need to build your own graphql() function to do that.
But I have forwarded your question to the issue tracker of GraphQL.js - maybe they have an idea or will add such an argument to the graphql() function (graphql/graphql-js#2278) - please join the discussion there as well. The preferred way to get new features into graphql-core is to get them into the reference implementation GraphQL.js, of which graphql-core is a port. That way everyone will benefit and graphql-core stays compatible.
I wanted to add some custom validation rules in addition to the default
graphql.specified_rules
. Unless I'm mistaken, the only way to do so is to manually callvalidate
with the new rules, which means that I basically have to duplicate all the code inside ofasync def graphql
, and change the validation step in order to pass in my custom rules. Is it possible instead to just allow clients to pass the rules they want to use into the top-levelgraphql
call?The text was updated successfully, but these errors were encountered: