- Extract the JWT decode functionality into a new library:
@neo4j/graphql-plugins - Expose an extended
AuthPluginclass that has adecodeJWTmethod on it. The class extends a ‘core’ abstract class calledNeo4jGraphQLAuthPluginexported directly from@neo4j/graphql. - Expose ability for users to specify plugins in
Neo4jGraphQLconstructor - Call a given plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "actor": { | |
| "name": "Tom Hanks", | |
| "movies": [ | |
| { | |
| "title": "Forrest Gump", | |
| "genres": [{ "name": "Drama" }, { "name": "Romance" }] | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MATCH (actor:Person {name: "Tom Hanks"}) | |
| CALL { | |
| WITH actor | |
| MATCH (actor)-[:ACTED_IN]->(movie:Movie) | |
| CALL { | |
| WITH movie | |
| MATCH (movie)-[:IN_GENRE]->(g:Genre) | |
| RETURN g {.*} AS genres | |
| } | |
| RETURN movie {.*, genres: genres} AS movies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MATCH (tom:Person {name: 'Tom Hanks'}) | |
| MATCH (tom)-[:ACTED_IN]->(:Movie)<-[:ACTED_IN]-(:Person)-[:ACTED_IN]->(:Movie)<-[:ACTED_IN]-(coCoActor:Person) | |
| WHERE | |
| tom <> coCoActor AND | |
| NOT (tom)-[:ACTED_IN]->(:Movie)<-[:ACTED_IN]-(coCoActor) | |
| RETURN coCoActor.name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MATCH (p:Person {name: 'Tom Hanks'}) | |
| MATCH (p)-[:ACTED_IN]->(:Movie)<-[:ACTED_IN]-(coActor:Person) | |
| RETURN coActor.name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "title": "Forrest Gump", | |
| "actors": [{ "name": "Tom Hanks" }], | |
| "genres": [{ "name": "Drama" }, { "name": "Romance" }] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MATCH (m:Movie {title: "Forrest Gump"}) | |
| MATCH (m)<-[:ACTED_IN]-(actors:Person) | |
| MATCH (m)-[:IN_GENRE]->(genres:Genre) | |
| RETURN m {.title, actors: collect(actors), genres: collect(genres)} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE (m:Movie {title: "Forrest Gump"})<-[:ACTED_IN]-(:Person {name: "Tom Hanks}) | |
| CREATE (m)-[:IN_GENRE]->(:Genre {name: "Drama"}) | |
| CREATE (m)-[:IN_GENRE]->(:Genre {name: "Romance"}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MATCH (m:Movie) | |
| WITH m AS m | |
| ORDER BY size(m.title) DESC | |
| WITH collect(m.title) AS list | |
| RETURN { result: head(list) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.7; | |
| import "@chainlink/contracts/src/v0.8/ChainlinkClient.sol"; | |
| contract ExampleContract is ChainlinkClient { | |
| using Chainlink for Chainlink.Request; | |
| bytes32 public longestMovieTitle; |