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

Add Schema::Object#wrap for opting out of initializing type objects at runtime #4524

Merged
merged 2 commits into from
Jun 27, 2023

Conversation

rmosolgo
Copy link
Owner

@rmosolgo rmosolgo commented Jun 20, 2023

Some systems don't actually use the instance/method features of GraphQL::Schema::Object and so initializing those objects is a waste of time and space. Adding Schema::Object#wrap provides an API for opting out of that initialization.

TODO:

  • Build out a test that demonstrates that any object can be returned and used at runtime (the current test still initializes a type instance). Make sure that fields are resolved properly, even though methods on the type object aren't used.

@rmosolgo rmosolgo added this to the 2.0.24 milestone Jun 20, 2023
@rmosolgo rmosolgo mentioned this pull request Jun 22, 2023
@rmosolgo rmosolgo merged commit d9bda56 into master Jun 27, 2023
13 checks passed
@rmosolgo rmosolgo deleted the object-wrap branch June 27, 2023 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant