Closed rex-remind101 closed 2 months ago
Hi! Sorry for the confusion and thanks for asking about it. In short, use ...
is an API for adding things to your schema. Whatever object is passed to use ...
receives a method call like .use(schema, **kwargs)
, and inside that method, it can do whatever it wants to the passed-in schema
.
There's not anything else special about plugins (yet...?), beside that .use
call. So you can see a few examples inside GraphQL-Ruby:
So, there's not really more to say about that. Arguably, that section could be removed from the docs entirely since it's not useful by itself. (That is, all the relevant plugins have documentation for use ...
).
If you give that API a try and run into any trouble, please let me know!
Describe the bug
There is a hint of documentation about writing Plugin but no detailed description of what interface or class to inherit to do so https://graphql-ruby.org/schema/definition.html#plugins . I'd like to write a plugin for some connection management but cannot figure out how.
Versions
latest
GraphQL schema
n/a
GraphQL query
n/a
Steps to reproduce
https://graphql-ruby.org/schema/definition.html#plugins
Expected behavior
There's clear documentation on how to implement a plugin.
Actual behavior
There's not clear documentation on how to implement a plugin.
n/a
Additional context
n/a