Skip to content
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

Require *Definition methods to return \GraphQL\Language\Source|NULL #1367

Open
Kingdutch opened this issue Oct 8, 2023 · 0 comments
Open
Labels
Milestone

Comments

@Kingdutch
Copy link
Contributor

We currently allow returning string|NULL from methods such as getSchemaDefinition and getExtensionDefinition. However, that does not allow providing location information which is very useful in debugging.

To ensure SDL can always be traced back to its origins we should force plugins to return a Source instance. The only required value for Source is the actual string, but it's very easy to provide a name such as "Automatically Generated by {plugin ID}".

Since this is a change of return type for something that's implemented in user land it's a breaking change and can only be done in 5.x.

@Kingdutch Kingdutch added the 5.x label Oct 8, 2023
@Kingdutch Kingdutch added this to the 5.0.0 milestone Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant