added contact* resolvers

pull/12/head
leonnicolas 4 years ago
parent 35144d6e73
commit e03bac6f62
No known key found for this signature in database
GPG Key ID: 088D0743E2B65C07

@ -58,7 +58,7 @@ export class CargoBikeAPI extends DataSource {
.from(CargoBike, 'cargoBike') .from(CargoBike, 'cargoBike')
.where('cargoBike.id = :id', { id: cargoBike.id }) .where('cargoBike.id = :id', { id: cargoBike.id })
.getOne(); .getOne();
if (bike) { if (bike.id) {
const lendingStationId = cargoBike.lendingStationId; const lendingStationId = cargoBike.lendingStationId;
delete cargoBike.lendingStationId; delete cargoBike.lendingStationId;
await this.connection.manager await this.connection.manager

@ -0,0 +1,108 @@
import { DataSource } from 'apollo-datasource';
import { Connection, getConnection } from 'typeorm';
import { ContactInformation } from '../../model/ContactInformation';
import { ContactPerson } from '../../model/ContactPerson';
export class ContactInformationAPI extends DataSource {
connection : Connection
constructor () {
super();
this.connection = getConnection();
}
async contactPersonById (id: number) {
return await this.connection.getRepository(ContactPerson)
.createQueryBuilder('contactPerson')
.select()
.where('"contactPerson".id = :id', { id: id })
.getOne();
}
async numContactInformationById (id: number) {
return await this.connection.getRepository(ContactInformation)
.createQueryBuilder('contactInformation')
.select()
.where('"contactInformation".id = :id', { id: id })
.getCount();
}
async contactInformationById (id: number) {
return await this.connection.getRepository(ContactInformation)
.createQueryBuilder('contactInformation')
.select()
.where('"contactInformation".id = :id', { id: id })
.getOne();
}
async contactPersonByLendingStationId (id: number) {
return await this.connection.getRepository(ContactPerson)
.createQueryBuilder('contactPerson')
.leftJoinAndSelect('contactPerson.lendingStation', 'lendingStation')
.where('"lendingStation".id = :id', { id: id })
.getMany().catch(() => { return []; });
}
async contactInformationByContactPersonId (id: number) {
return (await this.connection.getRepository(ContactPerson)
.createQueryBuilder('contactPerson')
.leftJoinAndSelect('contactPerson.contactInformation', 'contactInformation')
.where('"contactPerson".id = :id', { id: id })
.getOne())?.contactInformation;
}
async createContactPerson (contactPerson: any) {
if (await this.contactInformationById(contactPerson.contactInformationId)) {
const inserts = await this.connection.getRepository(ContactPerson)
.createQueryBuilder('contactPerson')
.insert()
.values([contactPerson])
.returning('*')
.execute();
await this.connection.getRepository(ContactPerson)
.createQueryBuilder('contactPerson')
.relation(ContactPerson, 'contactInformation')
.of(inserts.identifiers[0].id)
.set(contactPerson.contactInformationId);
return this.contactPersonById(inserts.identifiers[0].id);
} else {
return null;
}
}
async updateContactPerson (contactPerson: any) {
if (await this.contactPersonById(contactPerson.id)) {
const contactInformationId = contactPerson.contactInformationId;
delete contactPerson.contactInformationId;
if (contactInformationId) {
if (await this.contactInformationById(contactInformationId)) {
await this.connection.getRepository(ContactPerson)
.createQueryBuilder('contactPerson')
.update(ContactPerson)
.set({ ...contactPerson })
.where('id = :id', { id: contactPerson.id })
.execute();
await this.connection.getRepository(ContactPerson)
.createQueryBuilder('contactPerson')
.relation(ContactPerson, 'contactInformation')
.of(contactPerson.id)
.set(contactInformationId);
} else {
// supplied contactinformationId not found
return null;
}
return this.contactPersonById(contactPerson.id);
} else {
await this.connection.getRepository(ContactPerson)
.createQueryBuilder('contactPerson')
.update(ContactPerson)
.set({ ...contactPerson })
.where('id = :id', { id: contactPerson.id })
.execute();
return this.contactPersonById(contactPerson.id);
}
} else {
// updated bike not found
return null;
}
}
}

@ -1,7 +1,9 @@
import { DataSource } from 'apollo-datasource'; import { DataSource } from 'apollo-datasource';
import { GraphQLError } from 'graphql'; import { GraphQLError } from 'graphql';
import { Connection, getConnection } from 'typeorm'; import { Connection, getConnection } from 'typeorm';
import { CargoBike } from '../../model/CargoBike';
import { LendingStation } from '../../model/LendingStation'; import { LendingStation } from '../../model/LendingStation';
import { TimeFrame } from '../../model/TimeFrame';
export class LendingStationAPI extends DataSource { export class LendingStationAPI extends DataSource {
connection : Connection connection : Connection
@ -22,13 +24,48 @@ export class LendingStationAPI extends DataSource {
/** /**
* get all lendingStations * get all lendingStations
*/ */
async getLendingStations () { async lendingStations (offset: number, limit: number) {
return await this.connection.manager return await this.connection.getRepository(LendingStation)
.createQueryBuilder(LendingStation, 'lendingStation') .createQueryBuilder('lendingStation')
.leftJoinAndSelect('CargoBike', 'cargoBike', 'cargoBike.lendingStation = lendingStation.id')// ('lendingStation.cargoBikes', 'cargoBike.lendingStation', 'cargoBike', 'cargoBike.lendingStationId = lendingStation.id') .select()
.offset(offset)
.limit(limit)
.orderBy('name', 'ASC')
.getMany() || new GraphQLError('Internal Server Error: could not query data from table lendingStation'); .getMany() || new GraphQLError('Internal Server Error: could not query data from table lendingStation');
} }
async lendingStationByCargoBikeId (id: number) {
return await this.connection.getRepository(LendingStation)
.createQueryBuilder('lendingStation')
.leftJoinAndSelect('lendingStation.cargoBikes', 'cargoBikes')
.where('"cargoBikes"."lendingStationId" = :id', { id: id })
.getOne().catch(() => { return null; });
}
async timeFramesByLendingStationId (id: number) {
return await this.connection.getRepository(TimeFrame)
.createQueryBuilder('timeFrame')
.select()
.where('"timeFrame"."lendingStationId" = :id', { id: id })
.getMany().catch(() => { return []; });
}
async numCargoBikesByLendingStationId (id: number) {
return await this.connection.getRepository(CargoBike)
.createQueryBuilder('cargoBike')
.select()
.where('"cargoBike"."lendingStationId" = :id', { id: id })
.getCount();
}
async cargoBikesByLendingStationId (id: number) {
return await this.connection.getRepository(CargoBike)
.createQueryBuilder('cargoBike')
.select()
.where('"cargoBike"."lendingStationId" = :id', { id: id })
.getMany().catch(() => { return []; });
}
/** /**
* creates new lendingStation and returns new lendingStation with its new id * creates new lendingStation and returns new lendingStation with its new id
* @param param0 new lendingStation * @param param0 new lendingStation

@ -0,0 +1,19 @@
import { DataSource } from 'apollo-datasource';
import { Connection, getConnection } from 'typeorm';
import { Provider } from '../../model/Provider';
export class ProviderAPI extends DataSource {
connection : Connection
constructor () {
super();
this.connection = getConnection();
}
async providerById (id: number) {
await this.connection.getRepository(Provider)
.createQueryBuilder('provider')
.select()
.where('provider.id = :id', { id: id })
.getOne().catch(() => { return null; });
}
}

@ -13,7 +13,7 @@ import { BikeModel } from './model/BikeModel';
import { ContactInformation } from './model/ContactInformation'; import { ContactInformation } from './model/ContactInformation';
import { Equipment } from './model/Equipment'; import { Equipment } from './model/Equipment';
import { LendingStation } from './model/LendingStation'; import { LendingStation } from './model/LendingStation';
import { LoanPeriod } from './model/LoanPeriod'; import { TimeFrame } from './model/TimeFrame';
import { Participant } from './model/Participant'; import { Participant } from './model/Participant';
import { Organization } from './model/Organization'; import { Organization } from './model/Organization';
import { Provider } from './model/Provider'; import { Provider } from './model/Provider';
@ -24,6 +24,10 @@ import lendingstationResolvers from './resolvers/lendingstationResolvers';
import { ParticipantAPI } from './datasources/db/participantAPI'; import { ParticipantAPI } from './datasources/db/participantAPI';
import participantResolvers from './resolvers/participantResolvers'; import participantResolvers from './resolvers/participantResolvers';
import { ContactPerson } from './model/ContactPerson'; import { ContactPerson } from './model/ContactPerson';
import { ContactInformationAPI } from './datasources/db/contactinformationAPI';
import providerResolvers from './resolvers/providerResolvers';
import { ProviderAPI } from './datasources/db/providerAPI';
import contactinformationResolvers from './resolvers/contactinformationResolvers';
require('dotenv').config(); require('dotenv').config();
@ -64,7 +68,7 @@ createConnection({
ContactInformation, ContactInformation,
Equipment, Equipment,
LendingStation, LendingStation,
LoanPeriod, TimeFrame,
Organization, Organization,
Participant, Participant,
Provider, Provider,
@ -84,13 +88,17 @@ const server = new ApolloServer({
resolvers: [ resolvers: [
bikeresolver, bikeresolver,
lendingstationResolvers, lendingstationResolvers,
participantResolvers participantResolvers,
providerResolvers,
contactinformationResolvers
], ],
typeDefs, typeDefs,
dataSources: () => ({ dataSources: () => ({
cargoBikeAPI: new CargoBikeAPI(), cargoBikeAPI: new CargoBikeAPI(),
lendingStationAPI: new LendingStationAPI(), lendingStationAPI: new LendingStationAPI(),
participantAPI: new ParticipantAPI(), participantAPI: new ParticipantAPI(),
contactInformationAPI: new ContactInformationAPI(),
providerAPI: new ProviderAPI(),
userAPI userAPI
}), }),
context: (req: any) => { context: (req: any) => {

@ -4,7 +4,7 @@ import { Bike } from './BikeFeatures';
import { Provider } from './Provider'; import { Provider } from './Provider';
import { Participant } from './Participant'; import { Participant } from './Participant';
import { InsuranceData } from './InsuranceData'; import { InsuranceData } from './InsuranceData';
import { LoanPeriod } from './LoanPeriod'; import { TimeFrame } from './TimeFrame';
import { LendingStation } from './LendingStation'; import { LendingStation } from './LendingStation';
import { Taxes } from './Taxes'; import { Taxes } from './Taxes';
import { Equipment } from './Equipment'; import { Equipment } from './Equipment';
@ -118,10 +118,10 @@ export class CargoBike extends Bike {
@Column(type => InsuranceData) @Column(type => InsuranceData)
insuranceData: InsuranceData; insuranceData: InsuranceData;
@OneToMany(type => LoanPeriod, loanPeriod => loanPeriod.cargoBike, { @OneToMany(type => TimeFrame, loanPeriod => loanPeriod.cargoBike, {
nullable: true nullable: true
}) })
loanPeriods: LoanPeriod[]; loanPeriods: TimeFrame[];
// This relation is a little redundant because one could also check all LoanPeriods for current station // This relation is a little redundant because one could also check all LoanPeriods for current station
@ManyToOne(type => LendingStation, lendingStation => lendingStation.cargoBikes, { @ManyToOne(type => LendingStation, lendingStation => lendingStation.cargoBikes, {

@ -1,5 +1,5 @@
import { Entity, PrimaryGeneratedColumn, Column, ManyToMany, JoinTable, OneToMany, ManyToOne } from 'typeorm'; import { Entity, PrimaryGeneratedColumn, Column, ManyToMany, JoinTable, OneToMany, ManyToOne } from 'typeorm';
import { LoanPeriod } from './LoanPeriod'; import { TimeFrame } from './TimeFrame';
import { CargoBike } from './CargoBike'; import { CargoBike } from './CargoBike';
import { Organization } from './Organization'; import { Organization } from './Organization';
import { Address } from './Provider'; import { Address } from './Provider';
@ -20,8 +20,26 @@ export class LendingStation {
@Column(type => Address) @Column(type => Address)
address: Address; address: Address;
@OneToMany(type => LoanPeriod, loanPeriod => loanPeriod.lendingStation) /**
loanPeriods: LoanPeriod[]; * validity for loanPeriods
*/
@Column({
nullable: true,
type: 'date'
})
from: Date;
/**
* validity for loanPeriods
*/
@Column({
nullable: true,
type: 'date'
})
to: Date;
@OneToMany(type => TimeFrame, loanPeriod => loanPeriod.lendingStation)
loanPeriods: TimeFrame[];
@OneToMany(type => CargoBike, cargoBike => cargoBike.lendingStation, { @OneToMany(type => CargoBike, cargoBike => cargoBike.lendingStation, {
eager: false eager: false

@ -2,8 +2,11 @@ import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm';
import { LendingStation } from './LendingStation'; import { LendingStation } from './LendingStation';
import { CargoBike } from './CargoBike'; import { CargoBike } from './CargoBike';
/**
* When was a cargoBike at what lendingStation
*/
@Entity() @Entity()
export class LoanPeriod { export class TimeFrame {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id: number; id: number;

@ -48,6 +48,9 @@ export default {
}, },
equipment (parent: any, { offset, limit }: { offset: number, limit: number }, { dataSources, req }: { dataSources: any, req: any }) { equipment (parent: any, { offset, limit }: { offset: number, limit: number }, { dataSources, req }: { dataSources: any, req: any }) {
return dataSources.cargoBikeAPI.equipmentByCargoBikeId(offset, limit, parent.id); return dataSources.cargoBikeAPI.equipmentByCargoBikeId(offset, limit, parent.id);
},
lendingStation (parent: any, __: any, { dataSources, req }: { dataSources: any, req: any }) {
return dataSources.lendingStationAPI.lendingStationByCargoBikeId(parent.id);
} }
}, },
Equipment: { Equipment: {

@ -0,0 +1,30 @@
import { GraphQLError } from 'graphql';
import { Permission } from '../datasources/userserver/permission';
export default {
ContactPerson: {
contactInformation: (parent: any, __: any, { dataSources, req }: { dataSources: any, req: any }) => {
if (req.permissions.includes(Permission.ReadBike)) {
return dataSources.contactInformationAPI.contactInformationByContactPersonId(parent.id);
} else {
return new GraphQLError('Insufficient Permissions');
}
}
},
Mutation: {
createContactPerson: (_: any, { contactPerson }: { contactPerson: any }, { dataSources, req }: { dataSources: any, req: any }) => {
if (req.permissions.includes(Permission.WriteBike)) {
return dataSources.contactInformationAPI.createContactPerson(contactPerson);
} else {
return new GraphQLError('Insufficient Permissions');
}
},
updateContactPerson: (_: any, { contactPerson }: { contactPerson: any }, { dataSources, req }: { dataSources: any, req: any }) => {
if (req.permissions.includes(Permission.WriteBike)) {
return dataSources.contactInformationAPI.updateContactPerson(contactPerson);
} else {
return new GraphQLError('Insufficient Permissions');
}
}
}
};

@ -11,14 +11,28 @@ export default {
return new GraphQLError('Insufficient Permissions'); return new GraphQLError('Insufficient Permissions');
} }
}, },
lendingStations: (_: any, __: any, { dataSources, req }: { dataSources: any, req: any }) => { lendingStations: (_: any, { offset, limit }: { offset: number, limit: number }, { dataSources, req }: { dataSources: any, req: any }) => {
if (req.permissions.includes(Permission.ReadBike)) { if (req.permissions.includes(Permission.ReadBike)) {
return dataSources.lendingStationAPI.getLendingStations(); return dataSources.lendingStationAPI.lendingStations(offset, limit);
} else { } else {
return new GraphQLError('Insufficient Permissions'); return new GraphQLError('Insufficient Permissions');
} }
} }
}, },
LendingStation: {
contactPersons (parent: any, __: any, { dataSources, req }: { dataSources: any, req: any }) {
return dataSources.contactInformationAPI.contactPersonByLendingStationId(parent.id);
},
timeFrames (parent: any, __: any, { dataSources, req }: { dataSources: any, req: any }) {
return dataSources.lendingStationAPI.timeFramesByLendingStationId(parent.id);
},
numCargoBikes (parent: any, __: any, { dataSources, req }: { dataSources: any, req: any }) {
return dataSources.lendingStationAPI.numCargoBikesByLendingStationId(parent.id);
},
cargoBikes (parent: any, __: any, { dataSources, req }: { dataSources: any, req: any }) {
return dataSources.lendingStationAPI.cargoBikesByLendingStationId(parent.id);
}
},
Mutation: { Mutation: {
createLendingStation: (_: any, { lendingStation }:{ lendingStation: LendingStation }, { dataSources, req }:{dataSources: any, req: any }) => { createLendingStation: (_: any, { lendingStation }:{ lendingStation: LendingStation }, { dataSources, req }:{dataSources: any, req: any }) => {
if (req.permissions.includes(Permission.WriteBike)) { if (req.permissions.includes(Permission.WriteBike)) {

@ -23,7 +23,7 @@ export default {
return dataSources.participantAPI.engagementByParticipantId(parent.id); return dataSources.participantAPI.engagementByParticipantId(parent.id);
}, },
contactInformation (parent: any, _: any, { dataSources, req }: { dataSources: any, req: any }) { contactInformation (parent: any, _: any, { dataSources, req }: { dataSources: any, req: any }) {
return (dataSources.participantAPI.contactInformationByParticipantId(parent.id)); return (dataSources.contactInformationAPI.contactInformationByParticipantId(parent.id));
} }
}, },
Engagement: { Engagement: {

@ -0,0 +1,16 @@
import { GraphQLError } from 'graphql';
import { Permission } from '../datasources/userserver/permission';
export default {
Query: {
providerById: (_: any, { id }: { id: number, limit: number }, { dataSources, req }: { dataSources: any, req: any }) => {
if (req.permissions.includes(Permission.ReadBike)) {
return dataSources.providerAPI.providerById(id);
} else {
return new GraphQLError('Insufficient Permissions');
}
}
},
Mutation: {
}
};

@ -550,23 +550,21 @@ input ContactInformationUpdateInput {
note: String note: String
} }
type contactPerson { type ContactPerson {
id: ID! id: ID!
intern: Boolean! intern: Boolean!
contactInformation: ContactInformation! contactInformation: ContactInformation!
} }
input contactPersonCreateInput { input ContactPersonCreateInput {
intern: Boolean! intern: Boolean!
contactInformationCreate: ContactInformationCreateInput contactInformationId: ID!
contactInformationExisting: ContactInformationUpdateInput
} }
input contactPersonUpdateInput { input ContactPersonUpdateInput {
id: ID! id: ID!
intern: Boolean intern: Boolean
contactInformationCreate: ContactInformationCreateInput contactInformationId: ID
contactInformationExisting: ContactInformationUpdateInput
} }
type Organisation { type Organisation {
@ -586,10 +584,10 @@ type Organisation {
type LendingStation { type LendingStation {
id: ID! id: ID!
name: String! name: String!
contactInformation: [ContactInformation]! contactPersons: [ContactPerson]!
address: Address! address: Address!
loanTimes: LoanTimes timeFrames: [TimeFrame]!
loanPeriods: [LoanPeriod]! loanPeriods: LoanPeriods
cargoBikes: [CargoBike] cargoBikes: [CargoBike]
"Totola Amount of cargoBikes currently assigned to the lending station" "Totola Amount of cargoBikes currently assigned to the lending station"
numCargoBikes: Int! numCargoBikes: Int!
@ -599,8 +597,8 @@ input LendingStationCreateInput {
name: String! name: String!
contactInformation: [ContactInformationCreateInput]! contactInformation: [ContactInformationCreateInput]!
address: AddressCreateInput! address: AddressCreateInput!
loanTimes: LoanTimesInput loanPeriods: LoanPeriodsInput
loanPeriods: [LoanPeriodCreateInput]! timeFrames: [TimeFrameCreateInput]!
} }
input LendingStationUpdateInput { input LendingStationUpdateInput {
@ -608,15 +606,15 @@ input LendingStationUpdateInput {
name: String name: String
contactInformation: [ContactInformationUpdateInput] contactInformation: [ContactInformationUpdateInput]
address: AddressUpdateInput address: AddressUpdateInput
loanTimes: LoanTimesInput loanPeriods: LoanPeriodsInput
loanPeriods: [LoanPeriodUpdateInput] timeFrames: [TimeFrameUpdateInput]
} }
""" """
(dt. Ausleihzeiten) (dt. Ausleihzeiten) not implemented
""" """
type LoanTimes { type LoanPeriods {
generalRemark: String generalRemark: String
"notes for each day of the week, starting on Monday" "notes for each day of the week, starting on Monday"
notes: [String] notes: [String]
@ -630,7 +628,7 @@ type LoanTimes {
""" """
(dt. Ausleihzeiten) (dt. Ausleihzeiten)
""" """
input LoanTimesInput { input LoanPeriodsInput {
generalRemark: String generalRemark: String
"notes for each day of the week, starting on Monday" "notes for each day of the week, starting on Monday"
notes: [String] notes: [String]
@ -641,9 +639,8 @@ input LoanTimesInput {
times: [String] times: [String]
} }
"(dt. Zeitscheibe)" "(dt. Zeitscheibe)"
type LoanPeriod { type TimeFrame {
id: ID! id: ID!
from: Date! from: Date!
to: Date to: Date
@ -652,7 +649,7 @@ type LoanPeriod {
cargoBike: CargoBike! cargoBike: CargoBike!
} }
input LoanPeriodCreateInput { input TimeFrameCreateInput {
from: Date from: Date
to: Date to: Date
note: String note: String
@ -660,7 +657,7 @@ input LoanPeriodCreateInput {
cargoBikeID: CargoBikeCreateInput cargoBikeID: CargoBikeCreateInput
} }
input LoanPeriodUpdateInput { input TimeFrameUpdateInput {
id: ID! id: ID!
from: Date from: Date
to: Date to: Date
@ -692,7 +689,7 @@ type Query {
cargoBikeById(id:ID!): CargoBike cargoBikeById(id:ID!): CargoBike
"returns cargoBikes ordered by name ascending, relations are not loaded, use cargoBikeById instead" "returns cargoBikes ordered by name ascending, relations are not loaded, use cargoBikeById instead"
cargoBikes(offset: Int!, limit: Int!): [CargoBike]! cargoBikes(offset: Int!, limit: Int!): [CargoBike]!
"not important, you can just use providerById {cargoBikes}" "return null if id not found"
providerById(id:ID!): Provider providerById(id:ID!): Provider
"unique equipment with pagination, contains relation to bike (with no further joins), so if you wanna know more about the bike, use cargoBikeById" "unique equipment with pagination, contains relation to bike (with no further joins), so if you wanna know more about the bike, use cargoBikeById"
equipment(offset: Int!, limit: Int!): [Equipment]! equipment(offset: Int!, limit: Int!): [Equipment]!
@ -704,7 +701,7 @@ type Query {
"p" "p"
participants(offset: Int!, limit: Int!): [ Participant]! participants(offset: Int!, limit: Int!): [ Participant]!
lendingStationById(id:ID!): LendingStation lendingStationById(id:ID!): LendingStation
lendingStations: [LendingStation]! lendingStations(offset: Int!, limit: Int!): [LendingStation]!
contactInformation: [ContactInformation]! contactInformation: [ContactInformation]!
"returns BikeEvent with CargoBike" "returns BikeEvent with CargoBike"
bikeEventById(id:ID!): BikeEvent! bikeEventById(id:ID!): BikeEvent!
@ -715,7 +712,7 @@ type Mutation {
createCargoBike(cargoBike: CargoBikeCreateInput!): CargoBike! createCargoBike(cargoBike: CargoBikeCreateInput!): CargoBike!
"updates cargoBike of given ID with supplied fields and returns updated cargoBike" "updates cargoBike of given ID with supplied fields and returns updated cargoBike"
updateCargoBike(cargoBike: CargoBikeUpdateInput!): CargoBike! updateCargoBike(cargoBike: CargoBikeUpdateInput!): CargoBike!
"creates new peace of unique Equipment, the returned Equipment will contain a cargoBike, but that cargoBike will not contain equipment" "creates new peace of unique Equipment"
createEquipment(equipment: EquipmentCreateInput!): Equipment! createEquipment(equipment: EquipmentCreateInput!): Equipment!
"update Equipment, returns updated equipment. CargoBike will be null, if cargoBikeId is not set. Pass null for cargoBikeIs to delete the relation" "update Equipment, returns updated equipment. CargoBike will be null, if cargoBikeId is not set. Pass null for cargoBikeIs to delete the relation"
updateEquipment(equipment: EquipmentUpdateInput!): Equipment! updateEquipment(equipment: EquipmentUpdateInput!): Equipment!
@ -731,6 +728,10 @@ type Mutation {
createContactInformation(contactInformation: ContactInformationCreateInput!): ContactInformation! createContactInformation(contactInformation: ContactInformationCreateInput!): ContactInformation!
"create Engagement" "create Engagement"
createEngagement(engagement: EngagementCreateInput): Engagement! createEngagement(engagement: EngagementCreateInput): Engagement!
"createContacPerson ,return null if contactInformationId does not exist"
createContactPerson(contactPerson: ContactPersonCreateInput): ContactPerson
updateContactPerson(contactPerson: ContactPersonUpdateInput): ContactPerson
} }
`; `;

Loading…
Cancel
Save