Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/3.x/graphql-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Prop | Type | Default | Explanation
`variables` | Object | `{}` | GraphQL variables
`store` | String | `window.config.store_code` | Store code
[`group`](#grouping) | String | | Bundle queries by a name into 1 request [see: group](#grouping)
`check` | String | | Run a check on the response data, for example: `check="data.countries[0] == 'Country'"`
`check` | Function | | Run a check on the response data, for example: `check="(data) => data.countries[0] == 'Country'"`
`redirect` | String | | Where to redirect if the check fails
`cache` | String | | Cache key in localstorage. Caches only when provided and will be prefixed with `graphql_`. Flushes when the [cache](cache.md) is cleared.
`callback` | Function | | Called after the query
Expand Down
7 changes: 6 additions & 1 deletion src/3.x/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class Authenticate extends Middleware
}
```

## Frontend dependencies
## Frontend changes
### Dependencies

1. **Install**
```
Expand All @@ -54,6 +55,10 @@ yarn build

If you need to interact with the current Vue instance, do not use `turbo:load`. Instead use `vue:loaded` to ensure Vue has actually been booted.

### Graphql component

The `check` property on the graphql component has been changed from a string that gets evaluated to a function. This means that you will have to update each (normal) usage of `check="[...]"` to `check="(data) => data.[...]"`.

## Checkout changes

Everything has been migrated to use the GraphQL components for queries and mutations. On those components callbacks are used to process the data. So any changes made in an overwritten `checkout.vue` file and any checkout views should be reviewed.
Expand Down