prisma-labs / get-graphql-schema

Fetch and print the GraphQL schema from a GraphQL HTTP endpoint. (Can be used for Relay Modern.)
669 stars 62 forks source link

add --method arg to control verb used in schema request #17

Closed leemhenson closed 4 years ago

leemhenson commented 6 years ago

Hi. A little tweak to support obtaining the schema.json via a different verb (e.g GET) rather rather than the currently-enforced POST.

ThisIsMissEm commented 6 years ago

@leemhenson is there a reason why your graphql server doesn't support POST requests? (it's pretty much a standard to use POST over GET, unless you're using some form of persisted queries)

leemhenson commented 6 years ago

No reason, I just see "give me the schema" as a GET. Insert all usual fluff about GET vs POST here.

ThisIsMissEm commented 6 years ago

Ah, so not supporting GET doesn't actually mean you can't use this tool?

leemhenson commented 6 years ago

Well, it does unless I change my server from it's, in my opinion, currently "sane" config of serving the schema over GET.