-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
88 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,109 @@ | ||
type Object { | ||
name: String! | ||
content: String | ||
oneToOne(info: DataInput): Object | ||
oneToMany(info: DataInput): [Object] | ||
_id: String! | ||
createdAt: String | ||
updatedAt: String | ||
type Object{ | ||
name: String! | ||
content: String | ||
oneToOne( | ||
data: DataInput | ||
): Object | ||
oneToMany( | ||
data: DataInput | ||
): [Object] | ||
_id: String! | ||
createdAt: String | ||
updatedAt: String | ||
} | ||
|
||
type Query { | ||
objects( | ||
info: DataInput | ||
fieldFilter: FieldFilterInput | ||
fieldRegexFilter: FieldFilterInput | ||
dateFilter: DateFilterInput | ||
sortByField: SortInput | ||
): [Object!] | ||
oneById(info: DataInput, _id: String!): Object | ||
type Query{ | ||
objects( | ||
data: DataInput | ||
fieldFilter: FieldFilterInput | ||
fieldRegexFilter: FieldFilterInput | ||
dateFilter: DateFilterInput | ||
sortByField: SortInput | ||
): [Object!] | ||
oneById( | ||
data: DataInput | ||
_id: String! | ||
): Object | ||
} | ||
|
||
type Mutation { | ||
create(info: DataInput, object: Update!): String | ||
update(info: DataInput, _id: String, object: Update!): Boolean | ||
delete(info: DataInput, _id: String): Boolean | ||
type Mutation{ | ||
create( | ||
data: DataInput | ||
object: Update! | ||
): String | ||
update( | ||
data: DataInput | ||
_id: String | ||
object: Update! | ||
): Boolean | ||
delete( | ||
data: DataInput | ||
_id: String | ||
): Boolean | ||
} | ||
|
||
input DataInput { | ||
model: String | ||
sourceParameters: [String] | ||
related: [ReladedInput] | ||
addFields: [AddFieldsInput] | ||
input DataInput{ | ||
model: String | ||
sourceParameters: [String] | ||
related: [ReladedInput] | ||
addFields: [AddFieldsInput] | ||
} | ||
|
||
input AddFieldsInput { | ||
name: String! | ||
value: Anything | ||
input AddFieldsInput{ | ||
name: String! | ||
value: String | ||
} | ||
|
||
input ReladedInput { | ||
model: String! | ||
field: String | ||
input ReladedInput{ | ||
model: String! | ||
field: String | ||
} | ||
|
||
input Create { | ||
name: String! | ||
content: String | ||
owner: String | ||
input Create{ | ||
name: String! | ||
content: String | ||
owner: String | ||
} | ||
|
||
input FieldFilterInput { | ||
name: String | ||
content: String | ||
owner: String | ||
customFieldName: String | ||
input FieldFilterInput{ | ||
name: String | ||
content: String | ||
owner: String | ||
customFieldName: String | ||
} | ||
|
||
input SortInput { | ||
field: SortField! | ||
""" | ||
True for ASC, false for DESC | ||
""" | ||
order: Boolean | ||
input SortInput{ | ||
field: SortField! | ||
""" | ||
True for ASC, false for DESC | ||
""" | ||
order: Boolean | ||
} | ||
|
||
input DateFilterInput { | ||
""" | ||
Basicly filter use createdAt, | ||
but you can to set other field | ||
""" | ||
dateFieldName: String | ||
from: String | ||
to: String | ||
input DateFilterInput{ | ||
""" | ||
Basicly filter use createdAt, | ||
but you can to set other field | ||
""" | ||
dateFieldName: String | ||
from: String | ||
to: String | ||
} | ||
|
||
enum SortField { | ||
CREATED_AT | ||
UPDATED_AT | ||
NAME | ||
CUSTOM_FIELD_NAME | ||
enum SortField{ | ||
CREATED_AT | ||
UPDATED_AT | ||
NAME | ||
CUSTOM_FIELD_NAME | ||
} | ||
|
||
input Update { | ||
name: String | ||
content: String | ||
owner: String | ||
input Update{ | ||
name: String | ||
content: String | ||
owner: String | ||
} | ||
|
||
scalar Anything | ||
|
||
schema { | ||
query: Query | ||
mutation: Mutation | ||
schema{ | ||
query: Query | ||
mutation: Mutation | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters