vfa-tuanvm / GraphQL-NestJS

0 stars 0 forks source link

Schema database & Graphql schema #4

Open vfa-tuanvm opened 1 year ago

vfa-tuanvm commented 1 year ago

Schema database My Remote Image

GraphQL schema

input SignInInput {
  email: String!
  password: String!
}

input SignUpInput {
  fullName: String!
  email: String!
  password: String!
}
input LinkToSocialAccountInput {
  code: String!
  type: String!
}

type AuthResponse {
  email: String
  fullName: String
  avatar: String
  accessToken: String!
  refreshToken: String!
}

type AccountResponse {
  socialId: String!
  type: String!
}

query {
  signIn(input: SignInInput!): AuthResponse!
  getSocialAccountsLinked: [AccountResponse]!
}

mutation {
  signUp(input: SignUpInput!): String!
  signInFacebook(code: String!): AuthResponse!
  signInGoogle(code: String!): AuthResponse!
  unlinkSocialAccount(type: String!): String!
  linkToSocialAccount(input: LinkToSocialAccountInput!): AccountResponse!
}
vfa-tunq commented 1 year ago

social account thiếu email, avatar (lấy link hình social đầu tiên) table user thiếu fullname,

LinkToFacebookDTO, SignInFacebookDTO  ko cần có redirectURL, backend sẽ quy định.