-
Notifications
You must be signed in to change notification settings - Fork 220
Add declarative definitions import service #6651
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -59,7 +59,8 @@ | |
| "{projectRoot}/src/cli/api/graphql/app-management/generated/**/*.ts", | ||
| "{projectRoot}/src/cli/api/graphql/webhooks/generated/**/*.ts", | ||
| "{projectRoot}/src/cli/api/graphql/functions/generated/**/*.ts", | ||
| "{projectRoot}/src/cli/api/graphql/bulk-operations/generated/**/*.ts" | ||
| "{projectRoot}/src/cli/api/graphql/bulk-operations/generated/**/*.ts", | ||
| "{projectRoot}/src/cli/api/graphql/admin/generated/**/*.ts" | ||
| ], | ||
| "options": { | ||
| "commands": [ | ||
|
|
@@ -70,7 +71,8 @@ | |
| "pnpm eslint 'src/cli/api/graphql/app-management/generated/**/*.{ts,tsx}' --fix", | ||
| "pnpm eslint 'src/cli/api/graphql/webhooks/generated/**/*.{ts,tsx}' --fix", | ||
| "pnpm eslint 'src/cli/api/graphql/functions/generated/**/*.{ts,tsx}' --fix", | ||
| "pnpm eslint 'src/cli/api/graphql/bulk-operations/generated/**/*.{ts,tsx}' --fix" | ||
| "pnpm eslint 'src/cli/api/graphql/bulk-operations/generated/**/*.{ts,tsx}' --fix", | ||
| "pnpm eslint 'src/cli/api/graphql/admin/generated/**/*.{ts,tsx}' --fix" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
| ], | ||
| "cwd": "packages/app" | ||
| } | ||
|
|
@@ -163,6 +165,17 @@ | |
| "cwd": "{workspaceRoot}" | ||
| } | ||
| }, | ||
| "graphql-codegen:generate:admin-as-app": { | ||
| "executor": "nx:run-commands", | ||
| "inputs": ["{workspaceRoot}/graphql.config.ts", "{projectRoot}/src/cli/api/graphql/admin/**/*.graphql"], | ||
| "outputs": ["{projectRoot}/src/cli/api/graphql/admin/generated/**/*.ts"], | ||
| "options": { | ||
| "commands": [ | ||
| "pnpm exec graphql-codegen --project=adminAsApp" | ||
| ], | ||
| "cwd": "{workspaceRoot}" | ||
| } | ||
| }, | ||
| "graphql-codegen:postfix": { | ||
| "executor": "nx:run-commands", | ||
| "dependsOn": [ | ||
|
|
@@ -173,7 +186,8 @@ | |
| "graphql-codegen:generate:app-management", | ||
| "graphql-codegen:generate:webhooks", | ||
| "graphql-codegen:generate:functions", | ||
| "graphql-codegen:generate:bulk-operations" | ||
| "graphql-codegen:generate:bulk-operations", | ||
| "graphql-codegen:generate:admin-as-app" | ||
| ], | ||
| "inputs": [{ "dependentTasksOutputFiles": "**/*.ts" }], | ||
| "outputs": [ | ||
|
|
@@ -184,7 +198,8 @@ | |
| "{projectRoot}/src/cli/api/graphql/app-management/generated/**/*.ts", | ||
| "{projectRoot}/src/cli/api/graphql/webhooks/generated/**/*.ts", | ||
| "{projectRoot}/src/cli/api/graphql/functions/generated/**/*.ts", | ||
| "{projectRoot}/src/cli/api/graphql/bulk-operations/generated/**/*.ts" | ||
| "{projectRoot}/src/cli/api/graphql/bulk-operations/generated/**/*.ts", | ||
| "{projectRoot}/src/cli/api/graphql/admin/generated/**/*.ts" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And here |
||
| ], | ||
| "options": { | ||
| "commands": [ | ||
|
|
@@ -195,7 +210,8 @@ | |
| "find ./packages/app/src/cli/api/graphql/app-management/generated/ -type f -name '*.ts' -exec sh -c 'sed -i \"\" \"s|import \\* as Types from '\\''./types'\\'';|import \\* as Types from '\\''./types.js'\\'';|g; s|export const \\([A-Za-z0-9_]*\\)Document =|export const \\1 =|g\" \"$0\"' {} \\;", | ||
| "find ./packages/app/src/cli/api/graphql/webhooks/generated/ -type f -name '*.ts' -exec sh -c 'sed -i \"\" \"s|import \\* as Types from '\\''./types'\\'';|import \\* as Types from '\\''./types.js'\\'';|g; s|export const \\([A-Za-z0-9_]*\\)Document =|export const \\1 =|g\" \"$0\"' {} \\;", | ||
| "find ./packages/app/src/cli/api/graphql/functions/generated/ -type f -name '*.ts' -exec sh -c 'sed -i \"\" \"s|import \\* as Types from '\\''./types'\\'';|import \\* as Types from '\\''./types.js'\\'';|g; s|export const \\([A-Za-z0-9_]*\\)Document =|export const \\1 =|g\" \"$0\"' {} \\;", | ||
| "find ./packages/app/src/cli/api/graphql/bulk-operations/generated/ -type f -name '*.ts' -exec sh -c 'sed -i \"\" \"s|import \\* as Types from '\\''./types'\\'';|import \\* as Types from '\\''./types.js'\\'';|g; s|export const \\([A-Za-z0-9_]*\\)Document =|export const \\1 =|g\" \"$0\"' {} \\;" | ||
| "find ./packages/app/src/cli/api/graphql/bulk-operations/generated/ -type f -name '*.ts' -exec sh -c 'sed -i \"\" \"s|import \\* as Types from '\\''./types'\\'';|import \\* as Types from '\\''./types.js'\\'';|g; s|export const \\([A-Za-z0-9_]*\\)Document =|export const \\1 =|g\" \"$0\"' {} \\;", | ||
| "find ./packages/app/src/cli/api/graphql/admin/generated/ -type f -name '*.ts' -exec sh -c 'sed -i \"\" \"s|import \\* as Types from '\\''./types'\\'';|import \\* as Types from '\\''./types.js'\\'';|g; s|export const \\([A-Za-z0-9_]*\\)Document =|export const \\1 =|g\" \"$0\"' {} \\;" | ||
| ], | ||
| "cwd": "{workspaceRoot}" | ||
| } | ||
|
|
||
253 changes: 253 additions & 0 deletions
253
packages/app/src/cli/api/graphql/admin/generated/metafield_definitions.ts
This file contains hidden or 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,253 @@ | ||
| /* eslint-disable @typescript-eslint/consistent-type-definitions */ | ||
| import * as Types from './types.js' | ||
|
|
||
| import {TypedDocumentNode as DocumentNode} from '@graphql-typed-document-node/core' | ||
|
|
||
| export type MetafieldForImportFragment = { | ||
| key: string | ||
| name: string | ||
| namespace: string | ||
| description?: string | null | ||
| type: {category: string; name: string} | ||
| access: { | ||
| admin?: Types.MetafieldAdminAccess | null | ||
| storefront?: Types.MetafieldStorefrontAccess | null | ||
| customerAccount: Types.MetafieldCustomerAccountAccess | ||
| } | ||
| capabilities: {adminFilterable: {enabled: boolean}} | ||
| validations: {name: string; value?: string | null}[] | ||
| } | ||
|
|
||
| export type MetafieldDefinitionsQueryVariables = Types.Exact<{ | ||
| ownerType: Types.MetafieldOwnerType | ||
| after?: Types.InputMaybe<Types.Scalars['String']['input']> | ||
| }> | ||
|
|
||
| export type MetafieldDefinitionsQuery = { | ||
| metafieldDefinitions: { | ||
| pageInfo: {hasNextPage: boolean; endCursor?: string | null} | ||
| nodes: { | ||
| key: string | ||
| name: string | ||
| namespace: string | ||
| description?: string | null | ||
| type: {category: string; name: string} | ||
| access: { | ||
| admin?: Types.MetafieldAdminAccess | null | ||
| storefront?: Types.MetafieldStorefrontAccess | null | ||
| customerAccount: Types.MetafieldCustomerAccountAccess | ||
| } | ||
| capabilities: {adminFilterable: {enabled: boolean}} | ||
| validations: {name: string; value?: string | null}[] | ||
| }[] | ||
| } | ||
| } | ||
|
|
||
| export const MetafieldForImportFragmentDoc = { | ||
| kind: 'Document', | ||
| definitions: [ | ||
| { | ||
| kind: 'FragmentDefinition', | ||
| name: {kind: 'Name', value: 'MetafieldForImport'}, | ||
| typeCondition: {kind: 'NamedType', name: {kind: 'Name', value: 'MetafieldDefinition'}}, | ||
| selectionSet: { | ||
| kind: 'SelectionSet', | ||
| selections: [ | ||
| {kind: 'Field', name: {kind: 'Name', value: 'key'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: 'name'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: 'namespace'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: 'description'}}, | ||
| { | ||
| kind: 'Field', | ||
| name: {kind: 'Name', value: 'type'}, | ||
| selectionSet: { | ||
| kind: 'SelectionSet', | ||
| selections: [ | ||
| {kind: 'Field', name: {kind: 'Name', value: 'category'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: 'name'}}, | ||
| ], | ||
| }, | ||
| }, | ||
| { | ||
| kind: 'Field', | ||
| name: {kind: 'Name', value: 'access'}, | ||
| selectionSet: { | ||
| kind: 'SelectionSet', | ||
| selections: [ | ||
| {kind: 'Field', name: {kind: 'Name', value: 'admin'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: 'storefront'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: 'customerAccount'}}, | ||
| ], | ||
| }, | ||
| }, | ||
| { | ||
| kind: 'Field', | ||
| name: {kind: 'Name', value: 'capabilities'}, | ||
| selectionSet: { | ||
| kind: 'SelectionSet', | ||
| selections: [ | ||
| { | ||
| kind: 'Field', | ||
| name: {kind: 'Name', value: 'adminFilterable'}, | ||
| selectionSet: { | ||
| kind: 'SelectionSet', | ||
| selections: [{kind: 'Field', name: {kind: 'Name', value: 'enabled'}}], | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| }, | ||
| { | ||
| kind: 'Field', | ||
| name: {kind: 'Name', value: 'validations'}, | ||
| selectionSet: { | ||
| kind: 'SelectionSet', | ||
| selections: [ | ||
| {kind: 'Field', name: {kind: 'Name', value: 'name'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: 'value'}}, | ||
| ], | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| }, | ||
| ], | ||
| } as unknown as DocumentNode<MetafieldForImportFragment, unknown> | ||
| export const MetafieldDefinitions = { | ||
| kind: 'Document', | ||
| definitions: [ | ||
| { | ||
| kind: 'OperationDefinition', | ||
| operation: 'query', | ||
| name: {kind: 'Name', value: 'metafieldDefinitions'}, | ||
| variableDefinitions: [ | ||
| { | ||
| kind: 'VariableDefinition', | ||
| variable: {kind: 'Variable', name: {kind: 'Name', value: 'ownerType'}}, | ||
| type: {kind: 'NonNullType', type: {kind: 'NamedType', name: {kind: 'Name', value: 'MetafieldOwnerType'}}}, | ||
| }, | ||
| { | ||
| kind: 'VariableDefinition', | ||
| variable: {kind: 'Variable', name: {kind: 'Name', value: 'after'}}, | ||
| type: {kind: 'NamedType', name: {kind: 'Name', value: 'String'}}, | ||
| }, | ||
| ], | ||
| selectionSet: { | ||
| kind: 'SelectionSet', | ||
| selections: [ | ||
| { | ||
| kind: 'Field', | ||
| name: {kind: 'Name', value: 'metafieldDefinitions'}, | ||
| arguments: [ | ||
| { | ||
| kind: 'Argument', | ||
| name: {kind: 'Name', value: 'ownerType'}, | ||
| value: {kind: 'Variable', name: {kind: 'Name', value: 'ownerType'}}, | ||
| }, | ||
| {kind: 'Argument', name: {kind: 'Name', value: 'first'}, value: {kind: 'IntValue', value: '30'}}, | ||
| { | ||
| kind: 'Argument', | ||
| name: {kind: 'Name', value: 'after'}, | ||
| value: {kind: 'Variable', name: {kind: 'Name', value: 'after'}}, | ||
| }, | ||
| ], | ||
| selectionSet: { | ||
| kind: 'SelectionSet', | ||
| selections: [ | ||
| { | ||
| kind: 'Field', | ||
| name: {kind: 'Name', value: 'pageInfo'}, | ||
| selectionSet: { | ||
| kind: 'SelectionSet', | ||
| selections: [ | ||
| {kind: 'Field', name: {kind: 'Name', value: 'hasNextPage'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: 'endCursor'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: '__typename'}}, | ||
| ], | ||
| }, | ||
| }, | ||
| { | ||
| kind: 'Field', | ||
| name: {kind: 'Name', value: 'nodes'}, | ||
| selectionSet: { | ||
| kind: 'SelectionSet', | ||
| selections: [ | ||
| {kind: 'FragmentSpread', name: {kind: 'Name', value: 'MetafieldForImport'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: '__typename'}}, | ||
| ], | ||
| }, | ||
| }, | ||
| {kind: 'Field', name: {kind: 'Name', value: '__typename'}}, | ||
| ], | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| }, | ||
| { | ||
| kind: 'FragmentDefinition', | ||
| name: {kind: 'Name', value: 'MetafieldForImport'}, | ||
| typeCondition: {kind: 'NamedType', name: {kind: 'Name', value: 'MetafieldDefinition'}}, | ||
| selectionSet: { | ||
| kind: 'SelectionSet', | ||
| selections: [ | ||
| {kind: 'Field', name: {kind: 'Name', value: 'key'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: 'name'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: 'namespace'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: 'description'}}, | ||
| { | ||
| kind: 'Field', | ||
| name: {kind: 'Name', value: 'type'}, | ||
| selectionSet: { | ||
| kind: 'SelectionSet', | ||
| selections: [ | ||
| {kind: 'Field', name: {kind: 'Name', value: 'category'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: 'name'}}, | ||
| ], | ||
| }, | ||
| }, | ||
| { | ||
| kind: 'Field', | ||
| name: {kind: 'Name', value: 'access'}, | ||
| selectionSet: { | ||
| kind: 'SelectionSet', | ||
| selections: [ | ||
| {kind: 'Field', name: {kind: 'Name', value: 'admin'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: 'storefront'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: 'customerAccount'}}, | ||
| ], | ||
| }, | ||
| }, | ||
| { | ||
| kind: 'Field', | ||
| name: {kind: 'Name', value: 'capabilities'}, | ||
| selectionSet: { | ||
| kind: 'SelectionSet', | ||
| selections: [ | ||
| { | ||
| kind: 'Field', | ||
| name: {kind: 'Name', value: 'adminFilterable'}, | ||
| selectionSet: { | ||
| kind: 'SelectionSet', | ||
| selections: [{kind: 'Field', name: {kind: 'Name', value: 'enabled'}}], | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| }, | ||
| { | ||
| kind: 'Field', | ||
| name: {kind: 'Name', value: 'validations'}, | ||
| selectionSet: { | ||
| kind: 'SelectionSet', | ||
| selections: [ | ||
| {kind: 'Field', name: {kind: 'Name', value: 'name'}}, | ||
| {kind: 'Field', name: {kind: 'Name', value: 'value'}}, | ||
| ], | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| }, | ||
| ], | ||
| } as unknown as DocumentNode<MetafieldDefinitionsQuery, MetafieldDefinitionsQueryVariables> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't we just replace all these with something like this?
"{projectRoot}/src/cli/api/graphql/**/generated/**/*.ts"There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good shout. But let me add as a separate piece of stack -- there could be good reason, nx has its idiosyncrasies.