Graphql interface with auth

A thought/feedback on integration the community (me) is likely looking for.

For bigger apps, Apollo Federation would be a great, emerging-standard way to integrate Dgraph. Dgraph’s schema would be federated, custom logic can then be be done with middlewares mixed in, like graphql-shield for permission. I see this as the ideal way to fit Dgraph into a microservices architecture, with Dgraph as the main driver behind the main service while federating other services (like Auth) in an org.

So my question is, will Dgraph support custom logic in a way that Federation can be supported with Dgraph as an “Implementing service”? See docs at https://www.apollographql.com/docs/apollo-server/federation/implementing-services/. From what I can tell, Dgraph’s generated graphql server already meets all the expected types and resolvers in an Apollo sub-service. There just needs to be a way to build it as something equivalent to

const server = new ApolloServer({
  schema: buildFederatedSchema([{ typeDefs, resolvers }])
})

Again, thanks for all the work you are doing and the fund raising recently as validation of your revolutionary approach to rethink the database in a graph(ql) schemas world. I’m watching with keen interest for using it potentially in a large greenfield project at my company.

1 Like