-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.js
51 lines (46 loc) · 959 Bytes
/
schema.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
export const typeDefs = `#graphql
type Patent {
id: ID!,
title: String!,
authors: [String!]!,
citations: [Citation!]
}
type Citation {
id: ID!,
impact: Int!,
patent: Patent!,
author: Author!,
use: String
}
type Author {
id: ID!,
name: String!,
institute: String,
certified: Boolean!,
references: [Citation!],
patents: [Patent!]
}
type Query {
patents: [Patent]
patent(id: ID!): Patent
authors: [Author]
author(id: ID!): Author
citations: [Citation]
citation(id: ID!): Citation
}
type Mutation {
addPatent(patent: PatentDetails!): Patent
deletePatent(id: ID!): [Patent!]
updatePatent(id: ID!, edits: EditDetails): Patent
}
input PatentDetails {
title: String!,
authors: [String!]!,
}
input EditDetails {
title: String,
authors: [String!],
}
`
//BAISC SCALER TYPES IN GRAPGHQL
// int , float, string, boolean, ID