You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: changelog.md
+4
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,10 @@
2
2
3
3
## Next
4
4
5
+
### Major
6
+
7
+
- The `Query` (and the internal `GraphQLQuery`) component take an `operation` prop instead of separate `variables` and `query` props. This makes the implementation a little more elegant, is more consistent with the `GraphQL.query` API and allows sending custom GraphQL operation fields.
8
+
5
9
### Minor
6
10
7
11
- Improved `Provider` and `Consumer` component display names in React dev tools:
| `props.loadOnMount` | [boolean](https://mdn.io/boolean)? = `false` | Should the query load when the component mounts. |
304
303
| `props.loadOnReset` | [boolean](https://mdn.io/boolean)? = `false` | Should the query load when the [GraphQL cache](#graphql-instance-property-cache) is reset. |
@@ -319,16 +318,18 @@ _A query to display a user profile._
319
318
> loadOnMount
320
319
> loadOnReset
321
320
> fetchOptionsOverride={options=> {
322
-
>options.url='https://api.example.com/graphql'
321
+
>options.url='https://api.example.com/graphql'
323
322
> }}
324
-
> variables={{ userId }}
325
-
> query={`
326
-
> query user($userId: ID!) {
327
-
> user(userId: $userId) {
328
-
> name
323
+
> operation={
324
+
> variables: { userId },
325
+
> query:`
326
+
> query user($userId: ID!) {
327
+
> user(userId: $userId) {
328
+
> name
329
+
> }
329
330
> }
330
-
> }
331
-
> `}
331
+
> `
332
+
> }
332
333
>>
333
334
> {({
334
335
> load,
@@ -363,14 +364,16 @@ _A mutation to clap an article._
0 commit comments