Open osamamaruf opened 2 days ago
Current behavior I am using the following tutorial and while using the following query
mutation { createBook( item: { id: 1 title: "Introduction to Data API builder" pages: 200 years: 2024 chapters: [ { id: 2 name: "Configuration files", pages: 150 } { id: 3 name: "Running", pages: 50 } ] } ) { id title pages years chapters { items { name pages } } } }
I get the following error;
{ "errors": [ { "message": "The specified input object field `chapters` does not exist.", "locations": [ { "line": 8, "column": 7 } ], "path": [ "createBook" ], "extensions": { "field": "chapters", "specifiedBy": "http://spec.graphql.org/October2021/#sec-Input-Object-Field-Names" } } ] }
dab-config.json
{ "$schema": "https://github.com/Azure/data-api-builder/releases/download/v1.3.19/dab.draft.schema.json", "data-source": { "database-type": "postgresql", "connection-string": "Host=localhost;Port=5431;Database=postgres;User ID=postgres;Password=password;", "options": {} }, "runtime": { "rest": { "enabled": true, "path": "/api", "request-body-strict": true }, "graphql": { "enabled": true, "path": "/graphql", "allow-introspection": true }, "host": { "cors": { "origins": [], "allow-credentials": false }, "authentication": { "provider": "StaticWebApps" }, "mode": "development" } }, "entities": { "Book": { "source": { "object": "books", "type": "table" }, "graphql": { "enabled": true, "type": { "singular": "Book", "plural": "Books" } }, "rest": { "enabled": true }, "permissions": [ { "role": "anonymous", "actions": [ { "action": "*" } ] } ], "relationships": { "chapters": { "cardinality": "many", "target.entity": "Chapter", "source.fields": [], "target.fields": [], "linking.source.fields": [], "linking.target.fields": [] } } }, "Chapter": { "source": { "object": "chapters", "type": "table" }, "graphql": { "enabled": true, "type": { "singular": "Chapter", "plural": "Chapters" } }, "rest": { "enabled": true }, "permissions": [ { "role": "anonymous", "actions": [ { "action": "*" } ] } ], "relationships": { "book": { "cardinality": "one", "target.entity": "Book", "source.fields": [], "target.fields": [], "linking.source.fields": [], "linking.target.fields": [] } } } } }
Expected Behavior Book and its Chapters should get created.
1.3.19
PostgreSQL
Local (including CLI)
GraphQL
@osamamaruf , currently multiple mutation is only supported in MSSQL.
What happened?
Current behavior I am using the following tutorial and while using the following query
I get the following error;
dab-config.json
Expected Behavior Book and its Chapters should get created.
Version
1.3.19
What database are you using?
PostgreSQL
What hosting model are you using?
Local (including CLI)
Which API approach are you accessing DAB through?
GraphQL
Relevant log output
Code of Conduct