Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ETSWORK-17208 Support new GraphQL integration #441

Merged
merged 3 commits into from
Feb 14, 2023
Merged

Conversation

sjjharrington
Copy link
Contributor

@sjjharrington sjjharrington commented Feb 13, 2023

Expose a new mutation, via the JS SDK, which integrates with our new GraphQL API.

}

const response = await client.httpClient.post('graphql', data)
return response.data.data /* unwrap jsend */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: technically unwrapping graphql here, not jsend - both just happen to use a top level data prop.

@@ -204,6 +237,63 @@ describe('@workgrid/client', () => {
`)
})

test('graphql', async () => {
const query = `
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you tag this with gql, most editors will add syntax highlighting and prettier will auto format it.

Option 1

Suggested change
const query = `
const gql = String.raw
const query = gql`

Option 2

Suggested change
const query = `
const query = /* graphql */ `

@sjjharrington sjjharrington merged commit c30effa into master Feb 14, 2023
@sjjharrington sjjharrington deleted the support-graphql branch February 14, 2023 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants