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

add gratitude and request status to scehma #50

Open
utunga opened this issue Mar 18, 2022 · 0 comments
Open

add gratitude and request status to scehma #50

utunga opened this issue Mar 18, 2022 · 0 comments
Assignees

Comments

@utunga
Copy link
Contributor

utunga commented Mar 18, 2022

After issue #49 we can add some things to the schema

Suggestion:

type User {
    id: ID!
    email: String! @id
    name: String!
    age: Int
  	isAdmin: Boolean
  	createdTimestamp: DateTime
    requests: [Request] @hasInverse(field: "owner")
  	skills: [Skill] @hasInverse(field: "owner")
	  gratitudeSent: [Gratitude] @hasInverse(field: "from")
	  gratitudeReceived: [Gratitude] @hasInverse(field: "to")
}

type Request {
    id: ID!
    owner: User! @hasInverse(field: "requests")
    title: String! @search
    message: String! @search
  	status: RequestStatus!
  	hashtagVariants: [HashtagVariant]! @hasInverse(field: "requests")
  	createdTimestamp: DateTime
}

enum RequestStatus {
  	OPEN,
	  TENTATIVE,
	  FILLED,
	  DONE
}

type Skill {
  	id: ID!
  	owner: User! @hasInverse(field: "skills")
    title: String
    message: String
    hashtagVariants: [HashtagVariant]! @hasInverse(field: "skills")
    isAvailable: Boolean
  	createdTimestamp: DateTime
}

type Gratitude {
  	id: ID!
  	from: User! @hasInverse(field: "gratitudeSent")
  	to: User! @hasInverse(field: "gratitudeReceived")
        message: String
        hashtagVariants: [HashtagVariant]! @hasInverse(field: "skills")
  	createdTimestamp: DateTime
}
``
@mjxchina mjxchina self-assigned this Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants