GraphQL
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
# url
https://api.example.com/graphql
# document
query getMovieById($movieId: ID!) {
movie(id: $movieId) {
title
director {
name
}
}
}
# variables
movieId: "123"# url
https://api.example.com/graphql
# document
mutation createMovie($title: String!, $year: Int!) {
createMovie(title: $title, releaseYear: $year) {
id
title
}
}
# variables
title: My New Movie
year: 2025# url
https://api.example.com/graphql
# document
query {
myPrivateData {
secretInfo
}
}
# headers
Authorization: Bearer my-secret-auth-token