-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Something like
endpoint.add({
name: "DocumentReference",
schema: [{
id: "String",
status: "String",
resourceType: "String",
category: [{
coding: [{
code: "String",
display: "String",
system: "String"
}]
}],
content: [{
attachment: {
url: "String"
}
}],
identifier: [{
system: "String",
value: "String"
}],
type: {
coding: [{
code: "String",
display: "String",
system: "String"
}]
}
}],
args: {
offset: "Int",
limit: "Int",
project_id : "String"
},
defaults: {
offset: 0,
limit: 100
},
handler: (G, args) => {
return G.V().hasLabel("DocumentReference").skip(args.offset).limit(args.limit).toList()
}
})
Yields a graphql schema error:
message Error building Handler: graphql.NewSchema error: Schema must contain unique named types but contains multiple types named "coding"
Thinking this over a bit, it might make more sense to just split up the schema into 2 different endpoints to avoid this issue entirely.
However, I also think that there is value in creating some additional config or logic that is able to either detect common sub classes and create them at runtime, or be able to specific common classes and use them in the schema configuration.
Metadata
Metadata
Assignees
Labels
No labels