graphman
graphman copied to clipboard
feat: support other GraphQL clients by outputing to plain folders and .graphql files
Bonjour,
I heard from graphman at https://dev.to/tristankalos/graphman-generate-a-postman-collection-for-any-graphql-endpoint-4hff
Your tool seems like something that is totally needed.
GrapphQL being a standard, I feel like it should nothing in it is specific to Postman no ?
Apart from the very last step where you store the queries in the Postman collection format.
I use https://insomnia.rest/ and the GraphQL plugin for IntelliJ
If you have an option to write the queries simply in a plain folder with plain some-query.graphql
files, I would totally use it.
That's a great idea, and it should be easy to do with the existing codebase! Adding it to my to-do list, thanks for the suggestion! PS: The exported postman collection is already compatible with insomnia :)
Actually there is also the standard that works in many clients to put informations like the URL, headers, introspection, ... in a file called .graphqlconfig
Example .graphqlconfig
file for GitHub GraphQL:
{
"name": "GitHub GraphQL API",
"schemaPath": "schema.graphql",
"extensions": {
"endpoints": {
"https://api.github.com/graphql": {
"url": "https://api.github.com/graphql",
"headers": {
"user-agent": "JS GraphQL",
"Authorization": "bearer ${env:GITHUB_TOKEN}"
},
"introspect": true
}
}
}
}
So with this we would have all the other informations from the Postman collection