Skip to content

Commit da522d8

Browse files
committed
PR feedback
1 parent db374cd commit da522d8

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

packages/workgrid-client/src/client.test.ts

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -238,25 +238,27 @@ describe('@workgrid/client', () => {
238238
})
239239

240240
test('graphql', async () => {
241-
const query = `
242-
query appsQuery($spaceId: ID!) {
243-
me {
244-
space(spaceId: $spaceId) {
245-
id,
246-
apps {
247-
edges {
248-
node {
249-
entrypoint,
250-
title
251-
}
252-
},
253-
pageInfo {
254-
hasNextPage
255-
}
256-
}
241+
const gql = String.raw
242+
const query = gql`
243+
query appsQuery($spaceId: ID!) {
244+
me {
245+
space(spaceId: $spaceId) {
246+
id
247+
apps {
248+
edges {
249+
node {
250+
entrypoint
251+
title
257252
}
258253
}
259-
}`
254+
pageInfo {
255+
hasNextPage
256+
}
257+
}
258+
}
259+
}
260+
}
261+
`
260262

261263
const variables = {
262264
spaceId: '17dacf8d-ee8d-45ff-9d6b-f984e789c4e3',

packages/workgrid-client/src/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ setTypedMutationDefaults('graphql', (client) => ({
547547
}
548548

549549
const response = await client.httpClient.post('graphql', data)
550-
return response.data.data /* unwrap jsend */
550+
return response.data.data /* unwrap graphql */
551551
},
552552
}))
553553

0 commit comments

Comments
 (0)