cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

CodeAcademy example not working with latest GraphQl versions?

I'm trying to run query from CodeAcademys example. It works on sandbox and my own, local install when settings are copied from sandbox.

But if I upgrade dependencies to latest versions, then query does not work anymore.

query:

mutation {
  createReviews(
    input: {
      rating: 5
      text: "Best overview of graph data science!"
      book: { connect: { where: { title: "Graph Algorithms" } } }
    }
  ) {
    reviews {
      rating
      text
      createdAt
      book {
        title
      }
    }
  }
}

Error I receive:

"message": "Field "title" is not defined by type "BookConnectWhere".",

Is this example outdated or am I doing somethin wrong? Sorry for really newbie question but any help is appreciated

my updated package.json:
"dependencies": {
"@neo4j/graphql": "^2.4.0",
"apollo-server": "^3.5.0",
"dotenv": "^8.2.0",
"graphql": "^16.0.1",
"neo4j-driver": "^4.3.3",
"nodemon": "^2.0.7"
}

1 REPLY 1

Answering to myself: The example IS outdated, "where" now uses "node"

book: {connect:{ where: {node:{title:"Graph Algorithms"}}}}

source: A Look At The Neo4j GraphQL Library 2.0 Release - YouTube