Forum Discussion
Anonymous
1 year agoNot applicable
Fabric GraphQl - How to create multiple record under single mutation.
I am working on GraphQl In fabric. I am having a table which conatins 5 records. I want to create more twomore records in table. When I am tring below query getting some error. For...
- 1 year ago
Hello Anonymous
I have created a new WH called Graphql_test and created one tableMyTable andALTER TABLE MyTableADD CONSTRAINT PK_MyTable PRIMARY KEY NONCLUSTERED (ID) NOT ENFORCED;
It was empty table .
I added it to graphql api
and use muttation to add two records, it worked
Please see if this is helpful
nilendraFabric
1 year agoSuper User
There can be multiple reasons
Ensure pk is still valid
do try this
ALTER TABLE YourTable ADD CONSTRAINT PK_YourTable PRIMARY KEY NONCLUSTERED (Id) NOT ENFORCED;
And then try
mutation {
createempinfo1: createempinfo(item: {Id: 30, Name: "Rohan", Address: "Amravati"}) {
Id
Name
Address
}
createempinfo2: createempinfo(item: {Id: 31, Name: "Raj", Address: "Nagpur"}) {
Id
Name
Address
}
}
nilendraFabric
1 year agoSuper User
Try to change the keys as well
- Anonymous1 year agoNot applicable
Unable to the first query which you had shared.
- nilendraFabric1 year agoSuper User
Try to run it in warehouse
- Anonymous1 year agoNot applicable
We had ID column as PK already.