Back

[SOLVED] Enable GraphQL introspection

  • 0
  • GraphQL
ilikechicken77
31 May, 2023, 13:35

GraphQL introspection is disabled on default due to security reasons. Unfortunately i didn't find any documentation on how to enable it.

Apparently there is the environment variable "_APP_GRAPHQL_INTROSPECTION=1" which I added to the .env file. But when i check if the variable is valid after restarting the dockers with the "docker compose exec appwrite vars" command, its not appearing so I guess it doesnt work like that which is not a big surprise since it isnt mentioned in the docs.

Postman is therefore also still complaining that introspection is not allowed when I try to retrieve a schema.

Im sorry I am quite new to this topic:) and there isnt much helpful information on the web about that specific problem

TL;DR
To enable GraphQL introspection in Appwrite, you need to manually disable the environment variable "_APP_OPTIONS_ABUSE." There is no official documentation on how to enable introspection, but adding the environment variable "_APP_GRAPHQL_INTROSPECTION=1" to the .env file may work. However, this method does not appear to be mentioned in the docs and may not be reliable.
joeyouss
31 May, 2023, 15:13

did you run docker compose up -d

Drake
31 May, 2023, 16:01

Apparently there is the environment variable "_APP_GRAPHQL_INTROSPECTION=1" Where did you see that? 🧐

ilikechicken77
1 Jun, 2023, 08:20

yes I did

ilikechicken77
1 Jun, 2023, 08:22

Yeah sorry that was bing chat being funny.. I also couldnt find it in its linked sources.

ilikechicken77
1 Jun, 2023, 08:25

The fact that I dont find anything helpful about enabling GraphQL introspection on Appwrite lets me believe that at this point in time there introspection is just not available in general right?

Bouahaza
1 Jun, 2023, 08:37

Check compose file use for dev

Bouahaza
1 Jun, 2023, 08:37

And try altair ?

Bouahaza
1 Jun, 2023, 13:36

Strange but yes I test and confirm it

ilikechicken77
1 Jun, 2023, 14:57

Yes, it works<:appwriterocket:823996226894692403> Thanks very much guys<:appwritepeepo:902865250427215882>

ilikechicken77
1 Jun, 2023, 14:58

[SOLVED] Enable GraphQL introspection

ilikechicken77
1 Jun, 2023, 15:03

Solution Summary: In order to allow GraphQL introspection -> the environment variable _APP_OPTIONS_ABUSE has to be manually disabled

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more