apollo-tooling icon indicating copy to clipboard operation
apollo-tooling copied to clipboard

Include source and timestamp in downloaded schema.graphql

Open arnabkd opened this issue 5 years ago • 1 comments
trafficstars

In our old frontend project, we use the graphql-cli to download schema.graphql files. With apollo, we configure it pretty much the same way (albeit with different files), and we can successfully download a schema. However, there is one major issue:

  • we have no way of knowing where the schema was extracted from (aka test/staging/production/local)
  • when the schema was actually extracted (doesn't necessarily match the timestamp at which it was put into git)

With the graphql package, it was included at the top of the .graphql file like this:

# source: https://my-service.com/graphql
# timestamp: Tue Aug 11 2020 13:41:07 GMT+0200

I didn't see how this could be accomplished with the current apollo-cli. If there is a way, I'd be grateful for a link to some documentation that describes this. If not, this might be worth looking into.

arnabkd avatar Aug 11 '20 12:08 arnabkd

Any updates on this?

arnabkd avatar Oct 11 '21 13:10 arnabkd