Created
October 4, 2021 09:15
-
-
Save bogdanned/40f0748d460fe9f2b754ba47e1855e52 to your computer and use it in GitHub Desktop.
Testing A GraphQL Query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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