evyos-frontend-development/graphql/schema/personTypeDefs.ts

50 lines
1.1 KiB
TypeScript

import { gql } from "graphql-tag";
export const personTypeDefs = gql`
scalar Date
type Person {
id: ID!
firstName: String!
surname: String!
middleName: String!
sexCode: String!
personRef: String!
personTag: String!
fatherName: String!
motherName: String!
countryCode: String!
nationalIdentityId: String!
birthPlace: String!
birthDate: Date!
taxNo: String!
birthname: String!
}
input CreatePersonInput {
firstName: String!
surname: String!
middleName: String!
sexCode: String!
personRef: String!
personTag: String!
fatherName: String!
motherName: String!
countryCode: String!
nationalIdentityId: String!
birthPlace: String!
birthDate: Date!
taxNo: String!
birthname: String!
}
type Query {
persons: [Person!]!
person(id: ID!): Person
}
type Mutation {
createPerson(input: CreatePersonInput!): Person!
}
`;