There is a new feature called “custom logic” for GraphQL.
Do you have a resource on this? And is it compatible with Dgraph’s GraphQL±?
I was a bit broad with my last question. I’m trying to understand how to best utilize the flexibility of a Dgraph while also maintaining business logic on it - again, very broad. What I’ve sort of settled on after thinking about it is:
- provide “fixed” queries for known objects (like
orgoruser) - provide “dynamic” queries that read the schema and build “filter options” that, once selected, are used by the business logic to build actual queries and return values (if that makes sense)
Is there an easy way to read the full schema/index as a JSON object using the Go client for Dgraph?
For example, let’s say I had a schema that looked something like this (pseudocode):
[
Org {
name string
users [User
name string
]
items [Item
name string
]
}
]
A schema where there could be many Org types which have fields that contain many User/Item types. How could I query for an answer like “Type Org has fields called users that contain type User list and items that contains type Item list”. As far as I can tell the Types defined in the schema just show the clustering of predicates (and define indices) while the schema shows UID values but not the associated Type.
Thanks for the responses!
Best,
John