-
Notifications
You must be signed in to change notification settings - Fork 225
[@shopify/graphql-testing] upgrade @apollo/client and add props to GraphQL class #2708
Conversation
872f2bc
to
7982395
Compare
ac1d1bf
to
38fb7a9
Compare
38fb7a9
to
cc41cf9
Compare
@@ -31,7 +31,7 @@ | |||
"node": "^14.17.0 || >=16.0.0" | |||
}, | |||
"dependencies": { | |||
"@apollo/client": "^3.5.8", | |||
"@apollo/client": "^3.8.10", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how web platform folks feel, but I think using peerDependencies
for @apollo/client
may be the way to go so that apps have more freedom to upgrade when they see fit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense to me. I was worried about potential side effects of updating this. I think peerDependencies
makes takes away some risk.
c25c7b2
to
4876647
Compare
"graphql": ">=14.5.0 <16.0.0", | ||
"jest-matcher-utils": "^26.6.2" | ||
}, | ||
"devDependencies": { | ||
"graphql-typed": "^2.0.2" | ||
}, | ||
"peerDependencies": { | ||
"@apollo/client": ">=3.5.8 || <3.9.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit curious as to the <3.9.0
. Why not <4.0.0
? apollo is at 3.9.5
why wouldn't we want to support further?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested with 3.9.x
so I didn't want to go too high. That said, I think it's reasonable to include everything up to the next major version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think we could expand the peer range.
4876647
to
db7367f
Compare
db7367f
to
a224c11
Compare
Description
Part of https://github.com/Shopify/banking-client/issues/2257
Summary
We faced a few different problems while attempting to integrate this library into the banking-client.
ApolloClient
in theGraphQL
instance attempting to connect to dev tools by defaultconnectToDevTools: false
ingraphql-controller.ts
errorPolicy
of ApolloClient usesnone
by defaultcreateGraphQLFactory
to include an optionaldefaultOptions
@apollo/client
Question
Should this be a major version bump due to the
@apollo/client
upgrade?I chose minor when making the changeset since I don't think the optional param or
connectToDevTools: false
with break anything, but consumers on lower versions of@apollo/client
will be forced to upgrade.