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

don't pass introspection fields or objects to the def middleware callback #893

Merged
merged 1 commit into from
Mar 29, 2020

Conversation

benwilson512
Copy link
Contributor

@benwilson512 benwilson512 commented Mar 28, 2020

@benwilson512 benwilson512 requested a review from binaryseed March 28, 2020 15:43
@binaryseed
Copy link
Contributor

What's the impact of this - presumably some APIs out there were installing middleware on these fields, right?

@benwilson512
Copy link
Contributor Author

Probably not, they weren't available for this until one of the more recent 1.5 releases. I'll confirm that though.

@binaryseed
Copy link
Contributor

Oh great, that’s fine with me then.

@binaryseed
Copy link
Contributor

When does this expand function get called?

@benwilson512
Copy link
Contributor Author

It gets called at compile time in the InlineFunctions phase. If the result of expand can be safely macro escaped then that field's compile time struct gets populated with the middleware list. If it can't be macro escaped, then it happens when the type is loaded at runtime.

@halostatue
Copy link

This should also close absinthe-graphql/absinthe_plug#159

@benwilson512 benwilson512 merged commit 7821d27 into master Mar 29, 2020
@benwilson512 benwilson512 deleted the no-introspection-middleware-callback branch March 29, 2020 15:00
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.

Schema middleware callback affecting introspection Replacing middleware breaks GraphiQL discovery
3 participants