Expose only specific resolvers

For this, I guess GraphQL can provide a Schema directive for types like:

type User @CRUD(get: true, query: true, add: false, update: false, delete: false) {
  id: ID!
  name: String!
  ...
}

That would let users choose which resolvers are generated for each type.

For fine-grained use case like the two above, I guess you should be able to achieve them once we have custom JS resolvers working in Slash. They should be out soon. See Implement custom JS resolvers in GraphQL for more info about custom JS resolvers.

1 Like