Skip to content

Instantly share code, notes, and snippets.

@debu999
Forked from 2color/httpie-graphql.sh
Last active January 3, 2023 10:34
Show Gist options
  • Save debu999/2c3db13cbb979cbcc93cf1f9fb48f94b to your computer and use it in GitHub Desktop.
Save debu999/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 } }"
@debu999
Copy link
Author

debu999 commented Jan 3, 2023

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