Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support other GraphQL clients by outputing to plain folders and .graphql files #28

Open
jmfayard opened this issue Aug 10, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers p3 priority 3

Comments

@jmfayard
Copy link

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.

@nohehf
Copy link
Member

nohehf commented Aug 10, 2022

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 :)

@nohehf nohehf self-assigned this Aug 10, 2022
@nohehf nohehf added enhancement New feature or request good first issue Good for newcomers labels Aug 10, 2022
@jmfayard
Copy link
Author

jmfayard commented Aug 10, 2022

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

@nohehf nohehf added the p3 priority 3 label Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers p3 priority 3
Projects
None yet
Development

No branches or pull requests

2 participants