Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🤖 Sandbox code update #44

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions code/graphql/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const driver = neo4j.driver(
);

const typeDefs = /* GraphQL */ `
type Movie {
type Movie @exclude(operations: [CREATE, UPDATE, DELETE]) {
budget: Int
countries: [String]
imdbId: ID
Expand All @@ -25,9 +25,9 @@ type Movie {
tmdbId: String
url: String
year: Int
genres: [Genre] @relationship(type: "IN_GENRE", direction: OUT)
actors: [Actor] @relationship(type: "ACTED_IN", direction: IN)
directors: [Director] @relationship(type: "DIRECTED", direction: IN)
genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT)
actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN)
directors: [Director!]! @relationship(type: "DIRECTED", direction: IN)
similar(first: Int = 3): [Movie]
@cypher(
statement: """
Expand All @@ -38,18 +38,18 @@ type Movie {
)
}

type Genre {
type Genre @exclude(operations: [CREATE, UPDATE, DELETE]) {
name: String
movies: [Movie] @relationship(type: "IN_GENRE", direction: IN)
movies: [Movie!]! @relationship(type: "IN_GENRE", direction: IN)
}

type User {
type User @exclude(operations: [CREATE, UPDATE, DELETE]) {
userId: ID!
name: String
rated: [Movie] @relationship(type: "RATED", direction: OUT)
rated: [Movie!]! @relationship(type: "RATED", direction: OUT)
}

type Actor {
type Actor @exclude(operations: [CREATE, UPDATE, DELETE]) {
bio: String
born: Date
bornIn: String
Expand All @@ -58,18 +58,18 @@ type Actor {
poster: String
tmdbId: String
url: String
acted_in: [Movie] @relationship(type: "ACTED_IN", direction: OUT)
acted_in: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT)
}

type Director {
type Director @exclude(operations: [CREATE, UPDATE, DELETE]) {
bio: String
bornIn: String
imdbIb: String
name: String
poster: String
tmdbId: String
url: String
directed: [Movie] @relationship(type: "DIRECTED", direction: OUT)
directed: [Movie!]! @relationship(type: "DIRECTED", direction: OUT)
}

`;
Expand Down
2 changes: 1 addition & 1 deletion code/javascript/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const neo4j = require('neo4j-driver');
const driver = neo4j.driver('neo4j://<HOST>:<BOLTPORT>',
neo4j.auth.basic('<USERNAME>', '<PASSWORD>'),
{/* encrypted: 'ENCRYPTION_OFF' */});
{});

const query =
`
Expand Down
2 changes: 1 addition & 1 deletion code/python/example.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pip3 install neo4j-driver
# pip3 install neo4j
# python3 example.py

from neo4j import GraphDatabase, basic_auth
Expand Down