This error does not give much helpful information to debug.
{
"message": "Failed to fetch",
"stack": "TypeError: Failed to fetch"
}
We created a type on Slash and ran a mutation and loaded 29K nodes (I think, still can’t count nodes in graphql) Then we found some data problems and need to drop the data in that type and rerun the import mutation.
mutation {
deleteMyType(filter: {}) { numUids }
}
which resulted in the response above.
I modified the type to add an index on string field that has mostly the same value to get rid of a big chunk of the data with @search(by: [exact]) and then ran the following mutation:
If you saw a “failed to fetch” could you check if you got any logs in your browser console? The most common reason for things not being fetched is for that for whatever reason, you got an HTTP error, and CORS headers weren’t present on that error. Likely, the network tab / console of your browser will have the error code for us to debug further.
Access to fetch at 'https://[super-secret].us-west-2.aws.cloud.dgraph.io/graphql' from origin 'https://slash.dgraph.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Of course I switched out super-secret
Request Headers: (left out :authority: which has my url in it.)
I am still not that good with DQL syntax. I got a completion success done status from my upsert but the data is still there. Can you help me with a upsert to delete all data of a type?
@gja, With graphql I can delete a few at once with a filter using id but if I try to use a filter that selects a larger amount of data then the delete errors out. Almost like it is timing out or that it cannot process because it is too many uids trying to delete at once.