Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-16-2019 10:02 PM
I want to merge two schema result.Since Graphql does not make the merge statement for me. I have tried to make it myself but when i am trying to merge it is giving me null value ...
query{
users {
id
User_ID
Name
settings {
User_ID
Auto_Check_In
}
}
}
output:
{
"data": {
"users": [
{
"id": "0.55515894979673",
"User_ID": "2",
"Name": "kp",
"settings": null
}
]
}
}
Here is my schema
type User {
id:ID!
User_ID:String!
Mobile_Number:String!
Name:String!
Email_Id:String!
settings: [Settings]
}
type Settings {
id:ID!
User_ID:String!
Auto_Check_In:String!
Notification:String!
}
type RootMutation {
createdByUser(userInput:UserInput):User!
}
09-17-2019 05:42 PM
You should use the @relation
directive in your schema to define the relationship connecting User
and Settings
:
type User {
id: ID!
UserID: String!
Name: String!
Email_Id: String!
settings: [Settings] @relation(name: "HAS_SETTINGS", direction: "OUT")
}
See the docs for more info: https://grandstack.io/docs/graphql-relationship-types.html#defining-relationships-in-sdl
All the sessions of the conference are now available online