Gist 4e6751d83d024b58d7674490cb7f7a8f
✓ Published0🌍 Public
MMattDionis
Last edited May 24, 2019
Created on May 24, 2019
This example shows a GraphQL mutation for updating an app bar color setting in a client-side Apollo cache. The code defines `UPDATE_APP_BAR_COLOR_SETTING_MUTATION` using the `gql` template literal from Apollo’s `graphql-tag` package, specifying a `updateAppBarColorSetting` mutation that takes a `setting` string argument. The mutation includes an `@client` directive on both the mutation field and the nested `setting` field, indicating the operation is handled entirely on the client without a remote server. The data flow is visible through the mutation’s selection set, which returns the updated `setting` value.
AI-generated description