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

Update dev-session graphql queries #4863

Merged
merged 1 commit into from
Nov 15, 2024
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/consistent-type-definitions */
import * as Types from './types.js'
import {JsonMapType} from '@shopify/cli-kit/node/toml'

import {TypedDocumentNode as DocumentNode} from '@graphql-typed-document-node/core'

Expand All @@ -8,7 +9,11 @@ export type DevSessionCreateMutationVariables = Types.Exact<{
assetsUrl: Types.Scalars['String']['input']
}>

export type DevSessionCreateMutation = {devSessionCreate?: {userErrors: {message: string}[]} | null}
export type DevSessionCreateMutation = {
devSessionCreate?: {
userErrors: {message: string; on: JsonMapType; field?: string[] | null; category: string}[]
} | null
}

export const DevSessionCreate = {
kind: 'Document',
Expand Down Expand Up @@ -57,6 +62,9 @@ export const DevSessionCreate = {
kind: 'SelectionSet',
selections: [
{kind: 'Field', name: {kind: 'Name', value: 'message'}},
{kind: 'Field', name: {kind: 'Name', value: 'on'}},
{kind: 'Field', name: {kind: 'Name', value: 'field'}},
{kind: 'Field', name: {kind: 'Name', value: 'category'}},
{kind: 'Field', name: {kind: 'Name', value: '__typename'}},
],
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/consistent-type-definitions */
import * as Types from './types.js'
import {JsonMapType} from '@shopify/cli-kit/node/toml'

import {TypedDocumentNode as DocumentNode} from '@graphql-typed-document-node/core'

Expand All @@ -8,7 +9,11 @@ export type DevSessionUpdateMutationVariables = Types.Exact<{
assetsUrl: Types.Scalars['String']['input']
}>

export type DevSessionUpdateMutation = {devSessionUpdate?: {userErrors: {message: string}[]} | null}
export type DevSessionUpdateMutation = {
devSessionUpdate?: {
userErrors: {message: string; on: JsonMapType; field?: string[] | null; category: string}[]
} | null
}

export const DevSessionUpdate = {
kind: 'Document',
Expand Down Expand Up @@ -57,6 +62,9 @@ export const DevSessionUpdate = {
kind: 'SelectionSet',
selections: [
{kind: 'Field', name: {kind: 'Name', value: 'message'}},
{kind: 'Field', name: {kind: 'Name', value: 'on'}},
{kind: 'Field', name: {kind: 'Name', value: 'field'}},
{kind: 'Field', name: {kind: 'Name', value: 'category'}},
{kind: 'Field', name: {kind: 'Name', value: '__typename'}},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ mutation DevSessionCreate($appId: String!, $assetsUrl: String!) {
devSessionCreate(appId: $appId, assetsUrl: $assetsUrl) {
userErrors {
message
on
Copy link
Contributor

Choose a reason for hiding this comment

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

I won't block the CLI PR but on is a keyword in GraphQL, we should consider a different name for this field. It should still work though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

field
category
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ mutation DevSessionUpdate($appId: String!, $assetsUrl: String!) {
devSessionUpdate(appId: $appId, assetsUrl: $assetsUrl) {
userErrors {
message
on
field
category
}
}
}
Loading