Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relation - PRISMA2 #131

Closed
suplere opened this issue Nov 11, 2019 · 0 comments
Closed

Relation - PRISMA2 #131

suplere opened this issue Nov 11, 2019 · 0 comments

Comments

@suplere
Copy link

suplere commented Nov 11, 2019

Hello,
I have GRAPHQL server based on Prisma2. I have this schema for User and Event :

type Event {
id: ID!
typ: String!
category: String!
description: String
author: User!
location: String
distance: Int
color: String
fullDay: Boolean!
start: DateTime!
end: DateTime!
createdAt: DateTime!
updatedAt: DateTime!
duration: Float!
summary: String!
}
type User {
id: ID!
name: String
email: String!
events: [Event!]!
createdAt: DateTime!
updatedAt: DateTime!
}

How I can design belongsTo relation (based on author field) on Event object? In database I have in field author user id.

@suplere suplere closed this as completed Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant