Skip to content

Instantly share code, notes, and snippets.

@bogdanned
Created October 4, 2021 09:15
Show Gist options
  • Save bogdanned/40f0748d460fe9f2b754ba47e1855e52 to your computer and use it in GitHub Desktop.
Save bogdanned/40f0748d460fe9f2b754ba47e1855e52 to your computer and use it in GitHub Desktop.
Testing A GraphQL Query
const supertest = require("supertest");
let movie_list_query = `{
movies {
id
name
actors {
name
age
id
}
}
}
`;
describe("Query Tests", async () => {
it("Test the movie list query", async () => {
const query_response = await supertest(app).post().send({
query: movie_list_query
});
await console.log(query_response);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment