C# GraphQL Error InsertMany

Hello I’m using GraphQL in a C# app to insert records. If I copy my mutation into the GraphQL editor in the mongo realm tab it works fine. But running the query with

await client.SendQueryAsync(request)

give me this error

reason=“insert not permitted for document with _id: ObjectID(“6195356b084421da0fb1dd55”)”; code=“ArgumentsNotAllowed”; untrusted=“insert not permitted”; details=map[]

My GraphQL query is:

mutation {
insertManyMyType(data: [{_id:“6195356b084421da0fb1dd55”,

I’m able to insert one record successfully with the single mutation insertOneMyType in the C# app fine so it’s not a permission issue.



1 Like

Nevermind I found the issue my InsertMany was trying to insert a record for a partition I didn’t have access to. I’ll leave this post here though to help if anyone else has the same error.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.