Giter VIP home page Giter VIP logo

docs-graphql's Introduction

Neo4j: Graphs for Everyone

Neo4j is the world’s leading Graph Database. It is a high performance graph store with all the features expected of a mature and robust database, like a friendly query language and ACID transactions. The programmer works with a flexible network structure of nodes and relationships rather than static tables — yet enjoys all the benefits of enterprise-quality database. For many applications, Neo4j offers orders of magnitude performance benefits compared to relational DBs.

Learn more on the Neo4j website.

Discord

Discourse users

Using Neo4j

Neo4j is available both as a standalone server, or an embeddable component. You can download or try online.

Extending Neo4j

We encourage experimentation with Neo4j. You can build extensions to Neo4j, develop library or drivers atop the product, or make contributions directly to the product core. You’ll need to sign a Contributor License Agreement in order for us to accept your patches.

Dependencies

Neo4j is built using Apache Maven version 3.8.2 and a recent version of supported VM. Bash and Make are also required. Note that maven needs more memory than the standard configuration, this can be achieved with export MAVEN_OPTS="-Xmx2048m".

macOS users need to have Homebrew installed.

With brew on macOS

brew install maven

Please note that we do not support building Debian packages on macOS.

With apt-get on Ubuntu

sudo apt install maven openjdk-17-jdk

Be sure that the JAVA_HOME environment variable points to /usr/lib/jvm/java-17-openjdk-amd64 (you may have various java versions installed).

Building Neo4j

Before you start running the unit and integration tests in the Neo4j Maven project on a Linux-like system, you should ensure your limit on open files is set to a reasonable value. You can test it with ulimit -n. We recommend you have a limit of at least 40K.

  • A plain mvn clean install -T1C will only build the individual jar files.

  • Test execution is, of course, part of the build.

  • In case you just want the jars, without running tests, this is for you: mvn clean install -DskipTests -T1C.

  • You may need to increase the memory available to Maven: export MAVEN_OPTS="-Xmx2048m" (try this first if you get build errors).

  • You may run into problems resolving org.neo4j.build:build-resources due to a bug in maven. To resolve this simply invoke mvn clean install -pl build-resources.

Running Neo4j

After running a mvn clean install, cd into packaging/standalone/target and extract the version you want, then:

bin/neo4j-admin server start

in the extracted folder to start Neo4j on localhost:7474. On Windows you want to run:

bin\neo4j-admin server start

instead.

Neo4j Desktop

Neo4j Desktop is a convenient way for developers to work with local Neo4j databases.

To install Neo4j Desktop, go to Neo4j Download Center and follow the instructions.

Licensing

Neo4j Community Edition is an open source product licensed under GPLv3.

Neo4j Enterprise Edition includes additional closed-source components not available in this repository and requires a commercial license from Neo4j or one of its affiliates.

Trademark

Neo4j’s trademark policy is available at our trademark policy page.

docs-graphql's People

Contributors

angrykoala avatar darrellwarde avatar dependabot[bot] avatar liam-doodson avatar lidiazuin avatar macondoexpress avatar mjfwebb avatar recrwplay avatar rsill-neo4j avatar tbwiss avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs-graphql's Issues

Cypher Directive documentation improvements

Some feedback from some lacking documentation regarding @cypher directive:

It is not clear in the doc how to add a param in a GraphQL query directly which then binds to a variable in a cypher query through the @cypher directive.

Add example and information of a cypher query with the @cyper directive doing a lot of matches with several properties from different nodes and relationships, then in order for GraphQL to parse it properly you need to create a typeDef which holds all that information of all the properties you want to return, and then return them as a map.

[Docs] Add Logical Operators to the Filtering Documentation

Is your feature request related to a problem? Please describe.
Nowhere in the documentation is described how to work with logical operators (OR, AND), although it is implemented and works.

Describe the solution you'd like
The documentation for filtering should be extended by an example with OR or AND to make it easier for beginners.

For example, the following text could be inserted:

Filtering with logical operators
By using the OR or AND argument with a list of different filters, they can be logically related to each other. In the following example the User and 2 Posts can by retrieved by ID.

query {
    users {
        id
        name
        posts(where: {OR: [{ id: "2D297425-9BCF-4986-817F-F06EE0A1D9C7" }, { id: "SOME-OTHER-ID" }]}) {
            content
        }
    }
}

Using NestJS validations with Neo4jGraphQL library

Is your feature request related to a problem? Please describe.
While working on a project in nestjs using Graphql and Neo4j I have come across a problem when I need to validate the inputs for the Qureries and Mutations. However if you're following the approach described in Nestjs' documents adding these validations (using class-validator) is quite straight forward.

import { MinLength, MaxLength } from 'class-validator';

export class CreatePostInput {
  @MinLength(3)
  @MaxLength(50)
  title: string;
}

Whereas it can't be done with the suggested Schema Types approach from Neo4j (as class-validator requires class schema).

interface Production {
    title: String!
    actors: [Actor!]! @declareRelationship
}

type Movie implements Production {
    title: String!
    actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn")
    runtime: Int!
}

Describe the solution you'd like
I am looking for way where it's possible to add Schemas using classes so that we can take full advantage of existing futures of Nestjs and develop the applications without these constraints

Suggested additions to migration guide to make the process easier for users

Is your feature request related to a problem? Please describe.

While upgrading from 1x to 3x It was not clear based on the guide that I MUST upgrade to ApolloServer 3, since graphql 16+ requires this. Additionally, I needed to go find the graphql changelog which I think just including for users in the guide would be easier.

I also suspect more users than you think will need to upgrade from 1x to 3x since the GRANDSTACK starter still installs 1x as you can see in their lock file.

Describe the solution you'd like

  1. Add a mention at end of migration guide that ApolloServer 3.0 is required, maybe after this section.
  2. Add a link to the graphql 16 changelog which included breaking changes and is something most upgraders will need to dig up manually.

Describe alternatives you've considered
None

Additional context
None

Documentation Error handling

I searched the documentation for which erros are currently being thrown by neo4j/graphql, and under what circumstances. Unfortunately, there is currently no documentation for this.

I found the following errors in the code:

Neo4jGraphQLError

  • Neo4jGraphQLForbiddenError
  • Neo4jGraphQLAuthenticationError
  • Neo4jGraphQLConstraintValidationError
  • Neo4jGraphQLCypherBuilderError
  • Neo4jGraphQLRelationshipValidationError

Most of these are actually self-explanatory, but what is the Neo4jGraphQLRelationshipValidationError for, for example?. Under what circumstances is this error triggered? How should this error be handled?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.