Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-29-2018 12:03 PM
I have created a simple schema for testing. I know neo4j-graphql automatically adds some addiitonal args such as orderBy and filter as well as args for each node property.
Below is a simple object that is part of the schema
type Channel {
id: ID!
channelId: String
channelDays: [ChannelDay] @relation(name: "CHANNEL_DAY", direction: OUT)
}
When I run a query using the "id" arg it return the expected value, but when I run it using the channelId arg nothing is returned.
For example...
query TestQuery{
Channel(id: "Channel-10002"){
id
channelId
}
}
###### returns a result
{
"data": {
"Channel": [
{
"id": "Channel-10002",
"channelId": "10002"
}
]
},
"extensions": {
"type": "READ_ONLY"
}
}
######## BUT
query TestQuery{
Channel(channelId: "10002"){
id
channelId
}
}
###### returns no results
{
"data": {
"Channel": []
},
"extensions": {
"type": "READ_ONLY"
}
}
Can anyone help me determine what I'm doing wrong?
11-29-2018 01:35 PM
I think we chatted about this on Slack and the issue was that in the database channelId
is an integer and in the GraphQL schema it is declared as a string? Was that the problem?
11-29-2018 01:46 PM
Yes that was it, thank you very much William.
All the sessions of the conference are now available online