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

[5.x]: GraphQL mutation for nested elements does not accept entry titles #15270

Closed
AugustMiller opened this issue Jun 28, 2024 · 0 comments
Closed
Labels
bug graphql ⚙️ features related to the GraphQL API

Comments

@AugustMiller
Copy link
Contributor

What happened?

Description

Steps to reproduce

Execute a GraphQL query like this:

mutation MyMutation {
 save_tours_tour_Entry(
   title: "Test from GraphQL!"
   stops: {
     entries: [
       {
         stop: {
           destination: [8],
           highlights: "First stop!",
           id: "new-first"
         }
       }
     ],
     sortOrder: [
       "new-first"
     ]
   }
 ) {
   id
 }
}

Craft will produce an error like *Title* cannot be blank.. If you provide a title key in the stop hash like this…

stop: {
  title: "Example",
  destination: [8],
  highlights: "First stop!",
  id: "new-first"
}

…a new error is emitted: Field "title" is not defined by type stops_stop_MatrixEntryInput.

Craft CMS version

5.0.0+

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@AugustMiller AugustMiller added bug graphql ⚙️ features related to the GraphQL API labels Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug graphql ⚙️ features related to the GraphQL API
Projects
None yet
Development

No branches or pull requests

1 participant