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
6
votes
3 answers

Using ID in GraphQL parametrized query

I have the following schema: type Post { id: ID! text: String } I am using autogenerated mutations from neo4j-graphql.js, so I have access to the following mutation: UpdatePost( id: ID! text: String ): Post The issue: When I'm using the…
3kt
  • 2,543
  • 1
  • 17
  • 29
3
votes
0 answers

Combining Cypher and GraphQL unable to traverse relationship node

I am new to Neo4j and have been learning for the past few days about using GraphQL with Neo4j through Grandstack. I've been working through this Guide and this Repository working on setting up schemes. I've been working off of the sample neo4j movie…
3
votes
1 answer

Error: Unknown directive "relation". with Grand-stack of neo4j

I am trying grand-stack-starter from neo4j and getting the below error with API module after I do all the graphql schema part. it complains that directive 'relation' and 'cypher'are unknown. I reinstalled neo4j-graphql-js but didnt solve the…
techexplorer
  • 79
  • 2
  • 2
  • 8
2
votes
2 answers

Custom resolver with @cypher schema directive do not accept Date as an Input - GRANDStack

I`m trying to add custom resolvers to my grand stack app. There I get an error while passing DateInput to my mutation. This is my schema: type Registration @hasRole(roles: [admin]) { registrationId: ID! startDate: Date! endDate: Date } type…
cloudyguy
  • 21
  • 2
2
votes
1 answer

Infinite loading when lauching graphQL architect

I'm facing an infinite loading when I try to start graphQL architect from my Neo4J desktop app. I've found in the log than the app didn't found a file (grandstack.js). [2020-09-10 10:05:38.615] [info] Executing node graphql inferschema --neo4j-user…
2
votes
3 answers

SyntaxError: Unexpected token { when compiling my node.js code

I'm getting the below error every time with the first 'import' when I trying to run grandstack neo4j graphql api app. PS C:\Users\grand-stack-starter-master\api> nodemon index.js [nodemon] 1.19.1 [nodemon] to restart at any time, enter…
techexplorer
  • 79
  • 2
  • 2
  • 8
2
votes
1 answer

How to write relationship mutation in GraphQL using GRANDstack?

I am trying to create a relationship between to nodes in Neo4j using GraphQL. What should the mutation look like? Schema shows it should look like this. AddPersonRoll( from: _PersonInput! to: _RollInput! ): _AddPersonRollPayload I tryed mutation…
Nicole Marie
  • 121
  • 2
  • 8
1
vote
1 answer

AND is not returning result in GraphQL

I am trying to write a query with AND operator to extract data from neo4j in GraphQL but it doesn't return any result. I am using neo4j-graphql-js library. I have the following schema type Order { label: String id: String details:…
badar
  • 55
  • 5
1
vote
1 answer

to perform multiple dependent mutation - grandstack apollo graphql 3.3

I've a bit of confusion how to perform multiple mutation in graphql. I've read articles about using of graphql() function or compose() function, but i haven't understood if these are the legacy way to do it (version 2) or is still a valid way to…
pinale
  • 2,060
  • 6
  • 38
  • 72
1
vote
0 answers

GraphQL query not returning result with id argument

I have a basic graph set up on Neo4j that contains some movies and I'm using GraphQL to connect to it from a React App. I am testing some queries using the GraphQL playground before adding them to my React App and I've run into an issue when passing…
Sean
  • 494
  • 6
  • 23
1
vote
0 answers

Validating a neo4j database against a graphQL schema

During development & prototyping (and I guess in the long term), the GraphQL schema can undergo lots of changes including removing/renaming nodes, relationships, properties etc.. These old items persist in the neo4j database, and the database does…
ahmedhosny
  • 1,099
  • 14
  • 25
1
vote
0 answers

Using root object in graphql resolver function to access parent fields properties

I am using neo4j-graphql-js library to auto generate resolvers from the schema. For a node in the schema(Employee) i need to get a particular node property(empid) from a rest call as we plan to remove that property from our neo4j database due to…
noob
  • 74
  • 1
  • 8
1
vote
0 answers

How to make makeExecutableSchema ignore directives?

Is there a way to tell makeExecutableSchema from graphql-tools to ignore certain directives? I want to query my neo4j database with graphql. I also want to be able to specify subtypes in graphql. There is a library called graphql-s2s which adds…
helpusobi
  • 23
  • 1
  • 6
1
vote
1 answer

GraphQL vs Bolt - Neo4j

I am looking at the GRANDstack, and now I'm wondering- why would someone use GraphQL over the bolt protocol for accessing neo4j?
pebd
  • 84
  • 8
1
vote
1 answer

Issues deploying Apollo with GRAND stack using Serverless

I've been developing an app in the GRAND stack starter and after overcoming many hurdles, I finally wanted to deploy it and see it run. My goal is to do it all on Amazon. I have the front-end serving correctly, and a Neo4j instance running on an EC2…
1
2 3 4