Questions tagged [grandstack]

GRANDstack is combining GraphQL, React, Apollo, and the Neo4j Database into a modern stack for fast application development. You can find documentation, releases, and starters at https://grandstack.io. Before asking please make sure you use the latest release, no one else asked the question and you provided your GraphQL schema, - query, JS code and log outputs from GraphQL and Neo4j.

GRANDstack is combining GraphQL, React, Apollo, and the Neo4j Database into a modern stack for fast application development.

You can find documentation, blog, releases, and starter projects at https://grandstack.io.

Before asking please make sure you use the latest release, no one else asked the question and you provided your GraphQL schema, - query, JS code and log outputs from GraphQL and Neo4j.

The GRANDstack uses a query transpiler driven by the GraphQL schema (IDL, SDL) to generate Cypher queries for your GraphQL queries to run against Neo4j. Unlike most other GraphQL implementations, no n+1 backend queries are needed. A single Cypher query can serve arbitrarily complex GraphQL.

It works by augmenting your schema, adding additional top-level queries for your types. Also, mutations to create, update and delete types and relationships are added automatically. You control some of that with custom directives like @relationship.

Additionally, computed queries, mutations and fields can be added by providing Cypher statements in @cypher directives for them.

Here is an example schema:

type Movie {
    title: String
    year: Int
    imdbRating: Float
    genres: [Genre] @relation(name: "IN_GENRE", direction: "OUT")
}
type Genre {
    name: String
    movies: [Movie] @relation(name: "IN_GENRE", direction: "IN")
}
55 questions
0
votes
1 answer

Why does running Cypress on a React/GraphQL app return network errors when normal browsing doesn't?

I have a React/apollo client and an apollo/neo4j backend application based on GRANDStack. My React app runs on localhost:3000 and my GraphQL on localhost:4001/graphql, and they communicate without fail. All is working well in the app (with CORS…
Matthew
  • 153
  • 1
  • 7
0
votes
2 answers

Neo4j: Relating a node to a specific node with the same name

I have a list of all of the US states and towns. States can have the same town names so I'm checking to make sure each town is connected to their respected state. I have events connected to a town, but the problem is that my events are connecting…
0
votes
1 answer

Cypher recommendation score

Looking at the example from GrandStack movies workshop https://github.com/grand-stack/grand-stack-movies-workshop/blob/master/neo4j-database/answers.md The query proposed for recommended movies here MATCH (m:Movie) WHERE m.movieId = $movieId MATCH…
0
votes
1 answer

Why does "run seedDb" fail when I add in relations between nodes moving from graphql to neo4j

I got the demo example from grand-stack and was able to start up graphql, start up the Neo4J sandbox and populate the test database using npm run seedDb However, when I try to write my own data entries to populate into a neo4j database, I cannot…
Vinnie
  • 35
  • 4
0
votes
1 answer

For GRAND stack, how do you use the user object stored in Apollo Server's context when you write your own custom cypher queries for mutation?

I am writing a custom cypher query for mutation using GRAND stack. However, I am having problem accessing the user object stored in Apollo Server's context from the cypher queries I am writing. So instead of doing this, createUser(id: String):…
Tony Kim
  • 3
  • 1
0
votes
1 answer

Neo4j Recursive function

I am trying to make a tag system using Neo4j Cypher and having a very hard time (spent the last twelve hours banging my head) to making a recursive function. Let's say an array of property is given. The recursive function will: 1. first check if the…
Tony Kim
  • 3
  • 1
0
votes
2 answers

Unable to build Grand-Stack-Starter api, babel-node is not recognized

I am attempting to build the starter api for the Grand Stack Starter, but it fails each time I attempt to use npm start: >nodemon --exec babel-node src/index.js [nodemon] 1.18.7 [nodemon] to restart at any time, enter `rs` [nodemon] watching:…
Kelson448
  • 316
  • 1
  • 3
  • 7
0
votes
1 answer

In Neo4j Graphql Apollo server type definition how to add names with spaces?

My type definition is like this type COMPANY { "AIRLINE SEGMENT": String AIRLINE_TYPE: String } I get an error saying apollo server GraphQLError: Syntax Error: Expected Name, found : If I remove the space and quotes then I…
sushmit sarmah
  • 7,508
  • 6
  • 21
  • 24
0
votes
1 answer

Adding a relationship with properties breaks other queries

I was using the GRAND stack starter and recently went through upgrading my packages and the Neo4j database to match the current versions identified in the GRAND starter kit. This seems to have broken my most basic queries. I am creating a fairly…
BehemothDan
  • 316
  • 3
  • 15
-3
votes
1 answer

Grandstack and Forcegraph

Based on the basic grandstack app I am trying to load data from neo4j and visualize them based on the forcegraph 2d package. However, I am not capable of retrieving the data in the structure so that I can put them in the forcegraph. As a test query…
Tobias
  • 1
  • 1
1 2 3
4