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

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

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

alanpoulain
Copy link
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 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.
Byidi pushed a commit to Byidi/core that referenced this pull request Jan 30, 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