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

Fully Dynamic Schemas #1117

Open
zprobst opened this issue Oct 28, 2022 · 2 comments
Open

Fully Dynamic Schemas #1117

zprobst opened this issue Oct 28, 2022 · 2 comments
Labels
enhancement Improvement of existing features or bugfix

Comments

@zprobst
Copy link

zprobst commented Oct 28, 2022

First, I would like to say thank you for this great project.

Is your feature request related to a problem? Please describe.

I am looking to create a framework where the bulk of the code is written and rust and delegates to a language like python for business logic. Given these constraints, the schema of the API is inherently dynamic and thus is not known at compile time. It would be optimal if somehow juniper could support this (admittedly niche) use case.

Describe the solution you'd like
If juniper provided a lower level API that let you register types to a Registry dynamically and then propagate that up to an executable schema (side stepping traits like GraphQLType - which are not instance based), would allow for this to work.

Describe alternatives you've considered
I looked to see if this is possible today given the API's exposed by juniper. While the registry type is exposed and does seem to be the main point of interaction, this means you lose much of the query validation and other great work done by the juniper create.

I considered instead depending on graphql-parser and doing the validation and execution myself. But again, I lose a lot of what juniper has to offer. As an alternative to my idea above, Is there room for some crate between the ergonomics that juniper provides and the raw graphql parsing done in graphql-parser?

Additional context
This issue has been brought up in several issues in the past. Namely issues #7 and #106 but haven't really been obviously resolved.

@zprobst zprobst added the enhancement Improvement of existing features or bugfix label Oct 28, 2022
@tyranron
Copy link
Member

This would be possible only after #1072 redesign and partially implemented in #975.

@zprobst
Copy link
Author

zprobst commented Oct 28, 2022

@tyranron Thanks for the info. Where's the best place to contribute to move this along. It looks like #1072 is slated for 0.17. after 0.16. Would help be accepted on the issues in the 0.16 milestone to help move these along?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing features or bugfix
Projects
None yet
Development

No branches or pull requests

2 participants