RewriteQueries generates and rewrites GraphQL mutation m into DQL queries which check if any referenced node by XID or ID exist or not. Instead of filtering on dgraph.type like @filter(type(Parrot)), we query `dgraph.type` and filter it on GraphQL side. @filter(type(Parrot)) is costly in terms of me
(ctx context.Context, m schema.Mutation)
| 94 | // These query will be created in case of Add or Update Mutation which references node |
| 95 | // 0x127 or Computer of name "computer1" |
| 96 | RewriteQueries(ctx context.Context, m schema.Mutation) ([]*dql.GraphQuery, []string, error) |
| 97 | // Rewrite rewrites GraphQL mutation m into a Dgraph mutation - that could |
| 98 | // be as simple as a single DelNquads, or could be a Dgraph upsert mutation |
| 99 | // with a query and multiple mutations guarded by conditions. |
no outgoing calls