-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4918 from Shopify/identify-app-by-api-key
Allow identifying apps by API key, not ID
- Loading branch information
Showing
26 changed files
with
417 additions
and
207 deletions.
There are no files selected for viewing
164 changes: 164 additions & 0 deletions
164
packages/app/src/cli/api/graphql/app-management/generated/active-app-release-from-api-key.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
/* 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' | ||
|
||
export type ActiveAppReleaseFromApiKeyQueryVariables = Types.Exact<{ | ||
apiKey: Types.Scalars['String']['input'] | ||
}> | ||
|
||
export type ActiveAppReleaseFromApiKeyQuery = { | ||
app: { | ||
id: string | ||
key: string | ||
activeRoot: {clientCredentials: {secrets: {key: string}[]}} | ||
activeRelease: { | ||
id: string | ||
version: { | ||
name: string | ||
appModules: { | ||
uuid: string | ||
userIdentifier: string | ||
handle: string | ||
config: JsonMapType | ||
specification: {identifier: string; externalIdentifier: string; name: string} | ||
}[] | ||
} | ||
} | ||
} | ||
} | ||
|
||
export const ActiveAppReleaseFromApiKey = { | ||
kind: 'Document', | ||
definitions: [ | ||
{ | ||
kind: 'OperationDefinition', | ||
operation: 'query', | ||
name: {kind: 'Name', value: 'ActiveAppReleaseFromApiKey'}, | ||
variableDefinitions: [ | ||
{ | ||
kind: 'VariableDefinition', | ||
variable: {kind: 'Variable', name: {kind: 'Name', value: 'apiKey'}}, | ||
type: {kind: 'NonNullType', type: {kind: 'NamedType', name: {kind: 'Name', value: 'String'}}}, | ||
}, | ||
], | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
alias: {kind: 'Name', value: 'app'}, | ||
name: {kind: 'Name', value: 'appByKey'}, | ||
arguments: [ | ||
{ | ||
kind: 'Argument', | ||
name: {kind: 'Name', value: 'key'}, | ||
value: {kind: 'Variable', name: {kind: 'Name', value: 'apiKey'}}, | ||
}, | ||
], | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{kind: 'FragmentSpread', name: {kind: 'Name', value: 'AppVersionInfo'}}, | ||
{kind: 'Field', name: {kind: 'Name', value: '__typename'}}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
kind: 'FragmentDefinition', | ||
name: {kind: 'Name', value: 'ReleasedAppModule'}, | ||
typeCondition: {kind: 'NamedType', name: {kind: 'Name', value: 'AppModule'}}, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{kind: 'Field', name: {kind: 'Name', value: 'uuid'}}, | ||
{kind: 'Field', name: {kind: 'Name', value: 'userIdentifier'}}, | ||
{kind: 'Field', name: {kind: 'Name', value: 'handle'}}, | ||
{kind: 'Field', name: {kind: 'Name', value: 'config'}}, | ||
{ | ||
kind: 'Field', | ||
name: {kind: 'Name', value: 'specification'}, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{kind: 'Field', name: {kind: 'Name', value: 'identifier'}}, | ||
{kind: 'Field', name: {kind: 'Name', value: 'externalIdentifier'}}, | ||
{kind: 'Field', name: {kind: 'Name', value: 'name'}}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
kind: 'FragmentDefinition', | ||
name: {kind: 'Name', value: 'AppVersionInfo'}, | ||
typeCondition: {kind: 'NamedType', name: {kind: 'Name', value: 'App'}}, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{kind: 'Field', name: {kind: 'Name', value: 'id'}}, | ||
{kind: 'Field', name: {kind: 'Name', value: 'key'}}, | ||
{ | ||
kind: 'Field', | ||
name: {kind: 'Name', value: 'activeRoot'}, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: {kind: 'Name', value: 'clientCredentials'}, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: {kind: 'Name', value: 'secrets'}, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [{kind: 'Field', name: {kind: 'Name', value: 'key'}}], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
kind: 'Field', | ||
name: {kind: 'Name', value: 'activeRelease'}, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{kind: 'Field', name: {kind: 'Name', value: 'id'}}, | ||
{ | ||
kind: 'Field', | ||
name: {kind: 'Name', value: 'version'}, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{kind: 'Field', name: {kind: 'Name', value: 'name'}}, | ||
{ | ||
kind: 'Field', | ||
name: {kind: 'Name', value: 'appModules'}, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [{kind: 'FragmentSpread', name: {kind: 'Name', value: 'ReleasedAppModule'}}], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
} as unknown as DocumentNode<ActiveAppReleaseFromApiKeyQuery, ActiveAppReleaseFromApiKeyQueryVariables> |
Oops, something went wrong.