Open patrick91 opened 1 year ago
Please consider giving custom schema directives higher priority, this is the exact feature I need. I thinking about defining validation rules using it, so they would be synchronized between frontend and backend codebases. Is there any workaround I can use for now? And when do you plan to ship official support?
@Voldemat can you show me an example of this? what's the sdl and how would you like the schema to become?
The first problem is right now schema_directives is not exposed to introspection api, we use graphql-inspector to enforce compatibility between out file schema types and backend api types. After introspecting api, I didnt find any references of directive, opposed to introspection of file types using the same graphql-inspector. I
m not fully aware on which side the problem may be, so that is why I`m explaining whole process.
I created Keys directive as it is explained in the docs and even add it to schema_directive list to Schema initializer, however Keys directive is still absent from introspection api.
@Voldemat at the moment the GraphQL introspection doesn't support schema directives, but strawberry does when exporting the schema.
Just to clarify, this issue is about converting SDL to python, not python to SDL 😊 if you have issues with exporting the schema with directives feel free to open a new issue, I'll be happy to help!
Ok, thanks for clarification.
Follow up from https://github.com/strawberry-graphql/strawberry/pull/3096
Upvote & Fund