-
Notifications
You must be signed in to change notification settings - Fork 222
Allow GraphQL schema shorthand configuration #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
153383a to
ca48119
Compare
|
Hi @jane-olszewska, |
|
Hi @mcg-web :)
At the moment, it is compatible in that it won't break validation when moved over to different servers (and it's very easy to strip out by matching to a regexp). (In comparison to other extensions, a bit more compatible than for example + based syntax for decorators as introduced in the apollo extension.)
The resolvers are already declared as services and tagged appropriately so maybe it would be better to add custom attributes to service tags (a combination of type/field)? But the most convenient option would be to be able to jump from the type definition straight to the resolver method.
WDYM?
Yeah, so this PR is an extract of code I wrote for another project as you can tell by the 'todo' comments in the code (that will be cleaned up). Unfortunately, I don't currently have a lot of time to spend on expanding the library, but I thought people might make use of it as it is, even if the functionality is a bit limited. |
…tions functionality
… extra padding in comments
ca48119 to
932c4a4
Compare
|
I think this new feature of webonyx/graphql-php could help a lot on this webonyx/graphql-php#91... |
…edServiceMappingPass I see now that in fact there are many things that relu on this… - TypeResolver - ResolverResolver - MutationResolver - AccessResolver
Sadly further layers of the stack requires modification but this is fine for now.
Lazy type resolution
This PR adds the ability to define your schema in GraphQL schema shorthand.
It requires library version updates (patch version level) for better comment handling. Comments are the mechanism by which you can define elements that aren't reflected in schema shorthand: descriptions, resolvers and custom enum value values.
WIP - "men at work" warning - assume this branch will be rebased.
TODO, reminder to self:
OverblogGraphQLTypesExtension::parseSchemaToOverblogGraphQLTypesConfigArray()