Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(graphql)!: add extra args for custom queries or mutations#5359

Merged
alanpoulain merged 1 commit into
api-platform:mainfrom
alanpoulain:feat/graphql-extra-args
Jan 24, 2023
Merged

feat(graphql)!: add extra args for custom queries or mutations#5359
alanpoulain merged 1 commit into
api-platform:mainfrom
alanpoulain:feat/graphql-extra-args

Conversation

@alanpoulain
Copy link
Copy Markdown
Member

@alanpoulain alanpoulain commented Jan 23, 2023

Q A
Branch? main for features / current stable version branch for bug fixes
Tickets #5097 #2736
License MIT
Doc PR api-platform/docs#1705

This PR adds an extraArgs argument for GraphQL operations.
It also removes the generation of the required ID field in case of a custom query or mutation.
It is a slight BC break if the user relies on this required ID field.
It should be added back with the extra args if needed:

#[ApiResource(graphQlOperations: [
    new Mutation(
        name: 'custom',
        resolver: Resolver::class,
        extraArgs: ['id' => ['type' => 'ID!']],
    ),
])]

This commit also removes the generation of the required ID field in case
of a custom query or mutation.
It is a slight BC break if the user relies on this required ID field.
It should be added back with the extra args.
@alanpoulain alanpoulain force-pushed the feat/graphql-extra-args branch from e0bcef0 to 7c9b898 Compare January 23, 2023 15:50
@alanpoulain alanpoulain merged commit 851aa37 into api-platform:main Jan 24, 2023
jotwea pushed a commit to jotwea/api-platform-core that referenced this pull request Jan 25, 2023
…latform#5359)

This commit also removes the generation of the required ID field in case
of a custom query or mutation.
It is a slight BC break if the user relies on this required ID field.
It should be added back with the extra args.
syl20b pushed a commit to syl20b/api-platform-core that referenced this pull request Feb 8, 2023
…latform#5359)

This commit also removes the generation of the required ID field in case
of a custom query or mutation.
It is a slight BC break if the user relies on this required ID field.
It should be added back with the extra args.
soyuka pushed a commit to fraynaud1330/api-platform-core that referenced this pull request Feb 28, 2023
…latform#5359)

This commit also removes the generation of the required ID field in case
of a custom query or mutation.
It is a slight BC break if the user relies on this required ID field.
It should be added back with the extra args.
soyuka pushed a commit to mrossard/core that referenced this pull request Apr 14, 2023
…latform#5359)

This commit also removes the generation of the required ID field in case
of a custom query or mutation.
It is a slight BC break if the user relies on this required ID field.
It should be added back with the extra args.
Deuchnord pushed a commit to Deuchnord/api-platform-core that referenced this pull request Apr 25, 2023
…latform#5359)

This commit also removes the generation of the required ID field in case
of a custom query or mutation.
It is a slight BC break if the user relies on this required ID field.
It should be added back with the extra args.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant