Birden Çok Kaydı Değiştirme
Archie Core’un otomatik olarak oluşturulan GraphQL mutasyon işlemlerini kullanarak birden çok tablo kaydı oluşturabilirsiniz.
Aşağıdaki örneklerde, firstName, email, age gibi alanları ve ilişkileri içeren students adlı bir tablomuz var.
Birden çok kayıt oluşturma
Section titled “Birden çok kayıt oluşturma”İstek
mutation MyMutation1 { createStudentsMany( inputs: [ { firstName: "Michael", lastName: "Jones", email: "michael.jones@example.com" , age: 24 city: "2900562f-d036-486d-be98-9ebf064c27fe" } { firstName: "William", lastName: "Miller", email: "william.miller@example.com" , age: 23 city: "fd880601-8732-4b1b-a42d-4170ef9cc485" } ] ) { success }}Yanıt
{ "data": { "createStudentsMany": { "success": true } }}Değişkenlerle birden çok kayıt oluşturma
Section titled “Değişkenlerle birden çok kayıt oluşturma”İstek
mutation MyMutation1 ( $inputs: [StudentsCreateInput!]!) { createStudentsMany( inputs: $inputs ) { success }}Değişkenler
{ "inputs": [ { "firstName": "Michael", "lastName": "Jones", "email": "michael.jones@example.com" , "age": 24, "city": "2900562f-d036-486d-be98-9ebf064c27fe" }, { "firstName": "William", "lastName": "Miller", "email": "william.miller@example.com" , "age": 23, "city": "fd880601-8732-4b1b-a42d-4170ef9cc485" } ]}Yanıt
{ "data": { "createStudentsMany": { "success": true } }}