Query plan and tracing for non-Apollo GraphQL server

Hi,

I would like to get some insights into how Apollo adds tracing and the query plan to the response if the features are enabled. I want to add this to a custom GraphQL server I am working on.

I wasn’t able to find any good resources on what to add to the server’s responses so that it gets shown in playground. Is there any documentation for this?

I know this is technically not a question directly related to Apollo but since Apollo seems to be the only GraphQL server that supports tracing and the query plan I figured I would ask here.

Thanks for your help!
-puchm

For query planning, def recommend checking out Apollo Workbench. You can load the schema from a custom URL. So, it doesn’t have to be an Apollo GraphQL Server.

1 Like

As @kartik_gujarati suggested (Thanks for that recommendation, btw!), Workbench is a great local development tool to familiarize yourself with query plans — which are core to Apollo Federation! We also have query plan support built into Apollo Studio Explorer, where you can visualize the query plan as you write out the query. If you have feedback on either Apollo Studio Explorer or Workbench (or understanding the resulting query plans!), please feel free to open a new post!