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
This is a feature that's popping up in a fewother framework implementations, and I think it's pretty killer - it lets you do a reasonable job at statically detecting pathologic queries.
There are some more complex ideas floating out there in the community, namely graphql/graphql-js#304. This could be used both for complexity/cost analysis in addition to query resolution optimization, though it seems more useful for optimization. Probably overkill here.
Has anyone already thought of implementing this here, or should I take a crack at it?
The text was updated successfully, but these errors were encountered:
Hi @roippi , I started to work on it but the first priority is to get the docs updated. We can definitely discuss your ideas (let's say in gitter) so I can have as much input as possible.
And things would have access to the combined calculated score of all its subfields/subqueries.
Usage is pretty easy:
$processor = new Processor(new $mySchema());
$processor->setMaxComplexity(42);
// process normally, if complexity is exceeded it will return an error instead of trying to resolve the query
I'll hop into gitter to discuss. This is still a WIP so I'm open to feedback on the API, implementation, or test coverage 😄 .
This is a feature that's popping up in a few other framework implementations, and I think it's pretty killer - it lets you do a reasonable job at statically detecting pathologic queries.
There are some more complex ideas floating out there in the community, namely graphql/graphql-js#304. This could be used both for complexity/cost analysis in addition to query resolution optimization, though it seems more useful for optimization. Probably overkill here.
Has anyone already thought of implementing this here, or should I take a crack at it?
The text was updated successfully, but these errors were encountered: