move query string into the function scope

This commit is contained in:
2025-01-28 14:56:23 -08:00
parent cf3f26e255
commit f0828e836c

View File

@@ -64,22 +64,22 @@ describe("OrderedStopResolvers", () => {
} }
describe("nextStop", () => { describe("nextStop", () => {
const query = ` async function getResponseForQuery(stopId: string) {
query GetNextStop($systemId: ID!, $routeId: ID!, $stopId: ID!) { const query = `
system(id: $systemId) { query GetNextStop($systemId: ID!, $routeId: ID!, $stopId: ID!) {
route(id: $routeId) { system(id: $systemId) {
orderedStop(forStopId: $stopId) { route(id: $routeId) {
nextStop { orderedStop(forStopId: $stopId) {
routeId nextStop {
stopId routeId
stopId
}
} }
} }
} }
} }
} `;
`;
async function getResponseForQuery(stopId: string) {
return await testServer.executeOperation({ return await testServer.executeOperation({
query, query,
variables: { variables: {