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

Bump graphql-js-client to 0.11.0 #638

Merged
merged 2 commits into from
Mar 7, 2019
Merged

Conversation

rebeccajfriedman
Copy link
Contributor

Forward fix for #614 as it includes Shopify/graphql-js-client#121

Copy link
Contributor

@melissaluu melissaluu left a comment

Choose a reason for hiding this comment

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

👍

@@ -0,0 +1,8 @@
export default function fixtureWithHeaders(fixture) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need a test to test this helper function?

Copy link
Contributor

Choose a reason for hiding this comment

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

That doesn't seem like a bad idea. Technically, if this breaks, it could invalidate a whole whack of tests. I think tho, with the more recent change to the client (ignoring headers and trying to parse json and falling back to text), this method will probably become unnecessary. @rebeccajfriedman, is that correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@minasmart you are right. We are going to hold off on merging that PR in graphql-js-client because we aren't so happy with the resultant code, and we were struggling to come up with a better approach.

Copy link

@mcpatten mcpatten left a comment

Choose a reason for hiding this comment

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

Looks good to my eyes, with limited context.
Small question around the helper you've added, but it's non-blocking.

🙂 👍


export default function fetchMockPostOnce(fetchMock, apiUrl, fixture) {
fetchMock.postOnce(apiUrl, fixtureWithHeaders(fixture));
}
Copy link

Choose a reason for hiding this comment

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

I'm curious as to what this wrapper is helpful for (I may be missing some context). Is this required due to bumping the graph package, or is it just a syntactically preferred way to write these tests?

Copy link
Contributor Author

@rebeccajfriedman rebeccajfriedman Mar 7, 2019

Choose a reason for hiding this comment

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

Discussed offline :) [but largely syntax preference]

@rebeccajfriedman rebeccajfriedman merged commit 706ad50 into master Mar 7, 2019
@rebeccajfriedman rebeccajfriedman deleted the bump_graphql_js_client branch March 7, 2019 19:33
@rebeccajfriedman rebeccajfriedman temporarily deployed to production March 7, 2019 22:17 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants