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

Block introspection query on Absinthe layer #986

Closed
neslinesli93 opened this issue Nov 2, 2020 · 2 comments
Closed

Block introspection query on Absinthe layer #986

neslinesli93 opened this issue Nov 2, 2020 · 2 comments

Comments

@neslinesli93
Copy link

Hi, I am trying to upgrade to Absinthe 1.5 and I've stumbled upon an issue regarding the introspection query. So far I've been using a middleware to block the introspection query, but since this PR it doesn't work anymore: the middlewares are invoked at compile-time with all my queries, mutations and types and the introspection query is not one of them.

Is there a programmatic way do accomplish this, without having to do it at the http layer? Thanks

@binaryseed
Copy link
Contributor

Can you describe what it is that you are trying that does not work?

@binaryseed
Copy link
Contributor

I'd recommend using a @pipeline_modifier in your schema module..

Here's an example test that demonstrates modifying introspection:

https://github.com/absinthe-graphql/absinthe/blob/master/test/absinthe/schema/manipulation_test.exs#L235

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

No branches or pull requests

2 participants