Skip to content

Instantly share code, notes, and snippets.

@doogle-oss
Forked from 2color/httpie-graphql.sh
Last active January 3, 2023 10:34
Show Gist options
  • Save doogle-oss/2c3db13cbb979cbcc93cf1f9fb48f94b to your computer and use it in GitHub Desktop.
Save doogle-oss/2c3db13cbb979cbcc93cf1f9fb48f94b to your computer and use it in GitHub Desktop.
How to send a GraphQL request with HTTPie
http -f https://graphqlapiurl/graphql Authorization:"Bearer accessToken" query="query { Process(id=\"test\") { id title } }"
http -f https://graphqlapiurl/graphql Authorization:"Bearer accessToken" query="mutation { Process(id=\"test\", title=\"testtitle\") { id title } }"
@doogle-oss
Copy link
Author

Authorization is now a days common but can be removed for unprotected data. query is the default option you can add operation and variables to the call as well if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment