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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug Report: Generated App - GraphQL API is missing support to create many-to-many relations #2223

Closed
yuval-hazaz opened this issue Jan 27, 2022 · 0 comments 路 Fixed by #2311
Assignees
Milestone

Comments

@yuval-hazaz
Copy link
Member

What happened?

When using a many-to-many relation, currently there is no way to create data using that relation with GraphQL API

This functionality it available using REST API

What you expected to happen

The GraphQL API should allow creating data with many-to-many relation

How to reproduce

Create two entities with many-to-many relations:

  1. Post
  2. Tag
    Where each post can be related to many tags and each tag can be related to many posts

Open the graphQL playground and try to create a post with relations to tags, or a tag with relation to posts - there is no way to do that.

PostCreateInput & PostUpdateInput are missing a property for Tags
TagCreateInput & TagUpdateInput are missing a property for Posts

Note:
Open the Swagger page, and see that the REST API include endpoints for PATCH /api/posts/{id}/tags and PATCH /api/tags/{id}/posts as expected

Amplication version

0.11.1

Environment

n/a

Anything else

No response

Are you willing to submit PR?

No response

Code of Conduct

I agree to follow this project's Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants