Questions tagged [neo4j-graphql-js]
44 questions
2
votes
0 answers
How to create a follow/followed relationship using Neo4j and Neo4j GraphQL Library with @auth?
Using the following schema:
type Profile {
id: ID! @id
username: String! @unique(constraintName: "unique_email")
follows: [Profile!]!
@relationship(
type: "FOLLOWS"
properties: "BaseRelationship"
…

mrchestnut
- 342
- 5
- 11
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
neo4j-graphql-js: satisfy type using @cypher without returning a concrete node
Often I want to create a GraphQL type that represents the results of a Cypher query that spans than one node. I can't return a concrete node from @cypher in this case, as no such node exists. I tried to return appropriately named fields from a…

amoe
- 4,473
- 4
- 31
- 51
2
votes
1 answer
How to access request headers in custom graphQL resolvers when using neo4j-graphql-js?
When trying:
const server = new ApolloServer({
schema: schema,
context: { req, driver, neo4jDatabase: process.env.NEO4J_DATABASE },
introspection: true,
playground: true,
})
error: req is not defined
and when trying:
const server = new…

Yos
- 63
- 7
2
votes
2 answers
Neo4j: return error if no matching nodes found when creating a relationship?
Apologies if this has already been asked, but I was unable to find the answer
I would like to error when trying to create a relationship between nodes, where one or both of the nodes do not exist
For example, the following code just returns no…
user1506269
1
vote
0 answers
How to pass an array input variable to create multiple relationships?
I am trying to pass an array to form multiple relationships from a node I am creating to multiple other nodes. So far, I am only using the default resolvers created by the neo4j graphql library.
More specifically, I am trying to pass an array…

rvhorton
- 13
- 4
1
vote
1 answer
how to add neo4j-graphql library to graphql api
I am building a graphql api where I have created dummy data for testing and now I was hoping to connect the graphql api to neo4j database using neo4j-graphql library. can some one help me in connecting this graphql api to neo4j…
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
0 answers
How can we parse and modify a schema with makeAugmentedSchema
Related question.
I'm trying to add the internationalization feature to my database. It would be quite difficult to maintain a schema graphql if I needed to duplicate all translatable fields
I'm already using makeAugmentedSchema with…

Adrien Lemaire
- 1,744
- 2
- 20
- 29
1
vote
0 answers
How to execute a directive before a mutation is committed to the database?
I'm trying to add the internationalization feature to my database.
It would be quite difficult to maintain a schema graphql if I needed to duplicate all translatable fields
type Quest {
name @i18n # simple
}
type Quest {
nameEn
…

Adrien Lemaire
- 1,744
- 2
- 20
- 29
1
vote
1 answer
neo4j-graphql-js custom return type for @cypher query
I'm trying to extend the graphql schema autogenerated with neo4j-graphql-js
this is my graphql schema
typeDefs
type Person {
_id: Long!
addresslocation: Point!
confirmedtime: DateTime!
healthstatus: String!
id: String!
name:…

dna
- 2,097
- 1
- 11
- 35
1
vote
0 answers
How can I merge a schema after infer it from the driver?
I'm using inferSchema for generate GraphQL type definitions directly from the neo4j database, like this:
const inferAugmentedSchema = driver => {
return inferSchema(driver).then(result => {
return makeAugmentedSchema({
…

Ana Paula Lima
- 56
- 4
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
0
votes
0 answers
How to correctly restrict access to nested content in Neo4J-GraphQL?
I'd like to implement a basic Post system, such as described in the documentation.
A Post is related to a user, I'd like a Post to be only created/updated/deleted by its author.
type Post {
title: String!
content: String!
author: User!…

François Rioult
- 5
- 2
0
votes
1 answer
Can't manage to use JWT authentication/authorization with Neo4J-GraphQL
I'm trying to get Neo4J + graphQL lib 4.0.0 + authentication/authorization via JWT.
I managed to do it with graphQL 3.0.0 but can't now update to 4.0.0.
My base code relates on the documentation OGM/Examples/Custom Resolvers
I get the following…

François Rioult
- 5
- 2