How to create relation between records in multiple services


I am considering separating authentication into a separate service. This would allow my users to access multiple applications using the same account.

I’m thinking one dedicated service per application, and one for authentication.

My question is how do I create relations between a user in the authentication service and a record
in another service
that is owned by that user?

Here is wjhat the model would look like if it was only one service:

type User {
  id: ID! @unique
  username: String! @unique
  password: String!
  posts: [Post!]!

type Post {
  title: String
  content: String
  owner: User!

For starters, can I create a record while specifying the id?


This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.