Skip to content

Comments

[GraphQL] Make id field optional for custom mutations#2738

Closed
lukasluecke wants to merge 1 commit intoapi-platform:mainfrom
whatwedo:feature/graphql-optional-id
Closed

[GraphQL] Make id field optional for custom mutations#2738
lukasluecke wants to merge 1 commit intoapi-platform:mainfrom
whatwedo:feature/graphql-optional-id

Conversation

@lukasluecke
Copy link
Contributor

@lukasluecke lukasluecke commented Apr 16, 2019

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #2736
License MIT
Doc PR -

All other mutations (except create) get an optional id field to allow different kinds of custom mutations.

@lukasluecke lukasluecke changed the base branch from master to 2.4 April 16, 2019 18:45
@lukasluecke lukasluecke changed the base branch from 2.4 to master April 16, 2019 18:45
@lukasluecke lukasluecke force-pushed the feature/graphql-optional-id branch 2 times, most recently from 0ea74ff to de803af Compare April 17, 2019 07:13
@lukasluecke lukasluecke marked this pull request as ready for review April 17, 2019 08:12
@lukasluecke
Copy link
Contributor Author

@alanpoulain What do you think? (test failure seems to be unrelated)

Probably should be in 2.4 and not master, but I'll leave that up to you 🙈

@alanpoulain
Copy link
Member

I think we should have a Behat test for this feature.

@lukasluecke
Copy link
Contributor Author

I will try to add the test later today 🙂

@lukasluecke lukasluecke changed the title Add required id field only for update and delete mutations [GraphQL] Make id field optional for custom mutations Apr 18, 2019
@lukasluecke lukasluecke force-pushed the feature/graphql-optional-id branch from de803af to e824e6b Compare April 23, 2019 14:51
@lukasluecke
Copy link
Contributor Author

@alanpoulain I added a simple test for this change 🙂

@lukasluecke lukasluecke force-pushed the feature/graphql-optional-id branch from a3130cf to e313aea Compare July 11, 2019 09:55
@lukasluecke
Copy link
Contributor Author

lukasluecke commented Jul 11, 2019

@alanpoulain @dunglas I rebased this onto the newest changes again, could we maybe get this merged?

Some tests seem to be failing for some unrelated reason, the others I will look into shortly.

@alanpoulain
Copy link
Member

alanpoulain commented Jul 11, 2019

I'm not sure about this one. Now you can define your own arguments for your custom mutation.
By default the ID is required but you can remove or make it optional it if you want.

@lukasluecke lukasluecke force-pushed the feature/graphql-optional-id branch from e313aea to b79a347 Compare July 11, 2019 11:43
@lukasluecke
Copy link
Contributor Author

I don't think that the current possibilities for custom arguments are really "usable" for this, as I'd have to re-define all arguments just to get rid of the required ID. However if you think that the way forward would be better custom arguments, I'll try to work on that instead (might take a little longer though) 🙂

@kacperjurak
Copy link

Hello, is it possible to merge this change? I really need overwrite create mutation in my project.

Base automatically changed from master to main January 23, 2021 21:59
@stale
Copy link

stale bot commented Nov 5, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 5, 2022
@stale
Copy link

stale bot commented Jan 4, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 4, 2023
@stale stale bot closed this Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants