This document provides an introduction to GraphQL, including its history and key concepts. It discusses how GraphQL works with queries and mutations, schemas and types, validations and executions. Comparisons are made between GraphQL and REST. Examples of GraphQL queries and schemas are shown. Benefits of GraphQL include minimal code changes, no need for versioning, and handling client-specific data with one endpoint. Disadvantages include lack of "select *" and potential for large argument objects. Major companies using GraphQL are cited.
GraphQL is an application layer query language developed by Facebook that allows clients to define queries for retrieving multiple resources from an API in a single request. It uses a type system and schema to define the data and operations available. GraphQL aims to solve issues with REST APIs like over-fetching and under-fetching data by allowing clients to specify exactly what data they need.
This document discusses building a full stack graph application with Neo4j AuraDB, GitHub Actions, GraphQL, Next.js, and Vercel. It covers how to get data into Neo4j, build a GraphQL API with Neo4j and the GraphQL library, work with graphs on the frontend using GraphQL and React, and deploy the full application to Vercel. Code examples and resources are provided for each part of the process.
Moje slajdy z prezentacji na GraphQL Wroclaw #3 https://www.meetup.com/GraphQL-Wroclaw/events/261828347/
Większość prezentacji dotyczących GraphQL opowiada o JavaSkryptowych narzędziach, natomiast mało kto mówi o tym jak korzystać z GraphQL w Javie. Prezentacja będzie o tym, jak sprawić aby nasz backendowy, Javowy serwer korzystał z GraphQL. Będzie o możliwych podejściach w implementacji, dobrych praktykach i 4-letnim doświadczeniu z GraphQL na produkcji.
This document provides an overview of graph databases and their use cases. It begins with definitions of graphs and graph databases. It then gives examples of how graph databases can be used for social networking, network management, and other domains where data is interconnected. It provides Cypher examples for creating and querying graph patterns in a social networking and IT network management scenario. Finally, it discusses the graph database ecosystem and how graphs can be deployed for both online transaction processing and batch processing use cases.
This document provides an introduction and overview of GraphQL, including:
- A brief history of GraphQL and how it was created by Facebook and adopted by other companies.
- How GraphQL provides a more efficient alternative to REST APIs by allowing clients to specify exactly the data they need in a request.
- Some key benefits of GraphQL like its type system, declarative data fetching, schema stitching, introspection, and versioning capabilities.
- Some disadvantages like potential complexity in queries and challenges with rate limiting.
by Richard Threlkeld, Sr. Product Manager, AWS
Most applications are data-driven and our app is no exception to that. However, mobile development has some unique problems to be solved. In this session, we’ll introduce you to GraphQL – the latest in mobile-centric data access protocols – and show you how GraphQL can help with these problems.
Training Week: Build APIs with Neo4j GraphQL LibraryNeo4j
This document provides an overview and agenda for a workshop on building GraphQL APIs with the Neo4j GraphQL library and Neo4j Aura. The agenda includes introductions to GraphQL concepts, the Neo4j GraphQL library, and hands-on exercises to create a GraphQL API backed by Neo4j Aura for an online bookstore application. Code samples and resources are also provided.
This document provides an introduction to GraphQL, including its history and key concepts. It discusses how GraphQL works with queries and mutations, schemas and types, validations and executions. Comparisons are made between GraphQL and REST. Examples of GraphQL queries and schemas are shown. Benefits of GraphQL include minimal code changes, no need for versioning, and handling client-specific data with one endpoint. Disadvantages include lack of "select *" and potential for large argument objects. Major companies using GraphQL are cited.
GraphQL is an application layer query language developed by Facebook that allows clients to define queries for retrieving multiple resources from an API in a single request. It uses a type system and schema to define the data and operations available. GraphQL aims to solve issues with REST APIs like over-fetching and under-fetching data by allowing clients to specify exactly what data they need.
This document discusses building a full stack graph application with Neo4j AuraDB, GitHub Actions, GraphQL, Next.js, and Vercel. It covers how to get data into Neo4j, build a GraphQL API with Neo4j and the GraphQL library, work with graphs on the frontend using GraphQL and React, and deploy the full application to Vercel. Code examples and resources are provided for each part of the process.
Moje slajdy z prezentacji na GraphQL Wroclaw #3 https://www.meetup.com/GraphQL-Wroclaw/events/261828347/
Większość prezentacji dotyczących GraphQL opowiada o JavaSkryptowych narzędziach, natomiast mało kto mówi o tym jak korzystać z GraphQL w Javie. Prezentacja będzie o tym, jak sprawić aby nasz backendowy, Javowy serwer korzystał z GraphQL. Będzie o możliwych podejściach w implementacji, dobrych praktykach i 4-letnim doświadczeniu z GraphQL na produkcji.
This document provides an overview of graph databases and their use cases. It begins with definitions of graphs and graph databases. It then gives examples of how graph databases can be used for social networking, network management, and other domains where data is interconnected. It provides Cypher examples for creating and querying graph patterns in a social networking and IT network management scenario. Finally, it discusses the graph database ecosystem and how graphs can be deployed for both online transaction processing and batch processing use cases.
This document provides an introduction and overview of GraphQL, including:
- A brief history of GraphQL and how it was created by Facebook and adopted by other companies.
- How GraphQL provides a more efficient alternative to REST APIs by allowing clients to specify exactly the data they need in a request.
- Some key benefits of GraphQL like its type system, declarative data fetching, schema stitching, introspection, and versioning capabilities.
- Some disadvantages like potential complexity in queries and challenges with rate limiting.
by Richard Threlkeld, Sr. Product Manager, AWS
Most applications are data-driven and our app is no exception to that. However, mobile development has some unique problems to be solved. In this session, we’ll introduce you to GraphQL – the latest in mobile-centric data access protocols – and show you how GraphQL can help with these problems.
Training Week: Build APIs with Neo4j GraphQL LibraryNeo4j
This document provides an overview and agenda for a workshop on building GraphQL APIs with the Neo4j GraphQL library and Neo4j Aura. The agenda includes introductions to GraphQL concepts, the Neo4j GraphQL library, and hands-on exercises to create a GraphQL API backed by Neo4j Aura for an online bookstore application. Code samples and resources are also provided.
Building Fullstack Graph Applications With Neo4j Neo4j
This document provides an overview of graph databases and algorithms using Neo4j. It discusses Neo4j's built-in graph algorithms for pathfinding, centrality, community detection, similarity and link prediction. It also covers Neo4j Streams for real-time graph processing and integrations with Kafka. Grandstack and Neo4j-GraphQL are presented as options for building GraphQL APIs on Neo4j.
Neo4j is a native graph database that allows organizations to leverage connections in data to create value in real-time. Unlike traditional databases, Neo4j connects data as it stores it, enabling lightning-fast retrieval of relationships. With over 200 customers including Walmart, UBS, and adidas, Neo4j is the number one database for connected data by providing a highly scalable and flexible platform to power use cases like recommendations, fraud detection, and supply chain management through relationship queries and analytics.
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...luisw19
Originally designed by Facebook to allow its mobile clients to define exactly what data should be send back by an API and therefore avoid unnecessary roundtrips and data usage, GraphQL is a JSON based query language for Web APIs. Since it was open sourced by Facebook in 2015, it has undergone very rapid adoption and many companies have already switch to the GraphQL way of building APIs – see http://GraphQL.org/users.
However, with some many hundreds of thousands of REST APIs publicly available today (and many thousands others available internally), what are the implications of moving to GraphQL? Is it really worth the effort of replacing REST APIs specially if they’re successful and performing well in production? What are the pros/cons of using GraphQL? What tools / languages can be used for GraphQL? What about API Gateways? What about API design?
With a combination of rich content and hands-on demonstrations, attend this session for a point of view on how address these and many other questions, and most importantly get a better understanding and when/where/why/if GraphQL applies for your organisation or specific use case.
This document outlines an agenda and logistics for a training on Neo4j fundamentals and Cypher. It introduces graph concepts like nodes, relationships, and properties. It discusses why graphs are useful and shows examples of real-world domains that can be modeled as graphs. The training will cover introductory Cypher concepts like creating and matching patterns, and modeling exercises like representing a social network or movie genres graph. Logistics are provided like the WiFi password and a suggestion to work together in pairs on exercises.
Overview of GraphQL
How it is different from REST
When you should consider using it and when you should not
Incremental demos until calling GraphQL from an React application: https://github.com/bary822/graphQL-techtalk
This document provides an overview agenda for a Neo4j webinar. It introduces the presenters, Riccardo Ciarlo and Ivan Zoratti, and outlines the following topics: an introduction to Neo4j, what a graph database is, key use cases and how Neo4j enables them to be effective and fast, exploring and visualizing graphs, creating queries for the Neo4j database, and a question and discussion period.
Learn how to build advanced GraphQL queries, how to work with filters and patches and how to embed GraphQL in languages like Python and Java. These slides are the second set in our webinar series on GraphQL.
With the introduction of the Neo4j Graph Platform and increased adoption of graph database technology across all industries, now is a better time than ever to get started with graphs.
Join us for this introduction to Neo4j and graph databases. We'll discuss the primary use cases for graph databases and explore the properties of Neo4j that make those use cases possible.
The document provides an overview and introduction to Neo4j, a graph database. It discusses what graphs and Neo4j are, how to model data in a graph versus SQL, the Cypher query language to interact with Neo4j, and demonstrates Neo4j through the browser. It concludes by suggesting next steps to download Neo4j, choose a driver, join the community, and attend upcoming events.
This document provides an overview of graph databases and Neo4j. It begins with an introduction to graph databases and their advantages over relational databases for modeling connected data. Examples of real-world use cases that are well-suited for graph databases are given. The document then describes the core components of the graph data model including nodes, relationships, properties, and labels. It provides examples of how to model data as a graph and query graphs using Cypher, the query language for Neo4j. The document concludes by discussing Neo4j as an example of a graph database and its key features and capabilities.
Just a few years back, lack of a standard way to document, govern or describe a contract for the APIs acted as a deterrent to API adoption within the enterprise. WSDL 2.0 and WADL provided early support, but they couldn’t truly capture the essence of RESTful APIs. Recently we have seen the emergence of several description languages. New ways to describe and document APIs have emerged such as Swagger, RAML, API Blueprint and others, each taking a slightly different approach.
GraphQL is a wonderful abstraction for describing and querying data. Apollo is an ambitious project to help you build apps with GraphQL. In this talk, we'll go over how all the parts—Client, Server, Dev Tools, Codegen, and more—create an end-to-end experience for building apps on top of any data.
## Detailed description
In today's development ecosystem, there are tons of options for almost every part of your application development process: UI rendering, styling, server side rendering, build systems, type checking, databases, frontend data management, and more. However, there's one part of the stack that hasn't gotten as much love in the last decade, because it usually falls in the cracks between frontend and backend developers: Data fetching.
The most common way to load data in apps today is to use a REST API on the server and manage the data manually on the client. Whether you're using Redux, MobX, or something else, you're usually doing everything yourself—deciding when to load data, how to keep it fresh, updating the store after sending updates to the server, and more. But if you're trying to develop the best user experience for your app, all of that gets in the way; you shouldn't have to become a systems engineer to create a great frontend. The Apollo project is based on the belief that data loading doesn't have to be complicated; instead, you should be able to easily get the data you want, when you want it, and it should be managed for you just like React manages updating your UI.
Because data loading touches both the frontend and backend of your app, GraphQL and Apollo have to include many parts to fulfill that promise of being able to seamlessly connect your data together. First, we need client libraries not only for React and JavaScript, but also for native iOS and Android. Then, we must bring server-side support for GraphQL queries, mutations, and most recently subscriptions to every server technology and make those servers easier to write. And finally, we want not only all of the tools that people are used to with REST APIs, but many more thanks to all of the capabilities enabled by GraphQL.
In this talk, we'll go over all of the parts of a GraphQL-oriented app architecture, and how different GraphQL and Apollo technologies come together to solve all of the parts of data loading and management for React developers.
Introduction to Neo4j for the Emirates & BahrainNeo4j
This document provides an agenda and overview of a Neo4j presentation. It discusses Neo4j as the leading native graph database, its graph data science capabilities, and deployment options like Neo4j Aura and Cloud Managed Services. Success stories are highlighted like Minka using Neo4j Aura to power Colombia's new real-time ACH payments system. The presentation aims to demonstrate Neo4j's technology, use cases, and how it can drive business value through connecting data.
An Introduction to NOSQL, Graph Databases and Neo4jDebanjan Mahata
Neo4j is a graph database that stores data in nodes and relationships. It allows for efficient querying of connected data through graph traversals. Key aspects include nodes that can contain properties, relationships that connect nodes and also contain properties, and the ability to navigate the graph through traversals. Neo4j provides APIs for common graph operations like creating and removing nodes/relationships, running traversals, and managing transactions. It is well suited for domains that involve connected, semi-structured data like social networks.
This document is a presentation on GraphQL fundamentals. It was created by Virbhadra S. Ankalkote from BORN Group. The presentation covers what GraphQL is, who created it, why it was created, and how it works. It defines GraphQL as a query language for APIs that fulfills queries with existing data. It notes that Facebook developed GraphQL in 2012 for their native mobile app. In comparison to REST APIs, GraphQL allows clients to get precisely the data they need in one request. The presentation explains the GraphQL specification and includes sections on reading and writing data, using variables and fragments, and limitations such as indefinite querying depth.
Postman Webinar: "API Governance with Postman"Postman
Proper API governance can help you deliver more consistent APIs. Join Postman Chief Evangelist (and governance fanatic) Kin Lane in this webinar to learn essential elements of API governance using Postman. Kin will show you how the OpenAPI Specification and Postman Collections can help you test the results of each API while you measure, standardize, report, and govern APIs at scale.
The talk covers the following topics:
* Fundamental parts of a GraphQL server
* Defining API shape - GraphQL schema
* Resolving object fields
* Mutative APIs
* Making requests to a GraphQL server
* Solving N+1 query problem: dataloader
This document provides an overview and agenda for a workshop on building a full stack GraphQL application using Neo4j AuraDB, Next.js, and Vercel. The agenda includes introductions to Neo4j AuraDB, building GraphQL APIs, Next.js, and deploying to Vercel. Hands-on exercises will have attendees create a Neo4j AuraDB instance, build GraphQL APIs backed by Neo4j, develop a Next.js frontend application, and deploy the full stack application to Vercel.
Tutorial: Building a GraphQL API in PHPAndrew Rota
This document discusses building a GraphQL API in PHP. It provides an overview of GraphQL concepts like queries, fields, types and schemas. It then outlines the steps to build a GraphQL API in PHP using the graphql-php library:
1. Define object types and the Query root type in the schema
2. Initialize the GraphQL schema instance
3. Execute GraphQL queries against the schema and return the result
By following these steps, one can build an API for querying a database of PHP conferences and speakers to understand how to build GraphQL APIs in PHP.
Building Fullstack Graph Applications With Neo4j Neo4j
This document provides an overview of graph databases and algorithms using Neo4j. It discusses Neo4j's built-in graph algorithms for pathfinding, centrality, community detection, similarity and link prediction. It also covers Neo4j Streams for real-time graph processing and integrations with Kafka. Grandstack and Neo4j-GraphQL are presented as options for building GraphQL APIs on Neo4j.
Neo4j is a native graph database that allows organizations to leverage connections in data to create value in real-time. Unlike traditional databases, Neo4j connects data as it stores it, enabling lightning-fast retrieval of relationships. With over 200 customers including Walmart, UBS, and adidas, Neo4j is the number one database for connected data by providing a highly scalable and flexible platform to power use cases like recommendations, fraud detection, and supply chain management through relationship queries and analytics.
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...luisw19
Originally designed by Facebook to allow its mobile clients to define exactly what data should be send back by an API and therefore avoid unnecessary roundtrips and data usage, GraphQL is a JSON based query language for Web APIs. Since it was open sourced by Facebook in 2015, it has undergone very rapid adoption and many companies have already switch to the GraphQL way of building APIs – see http://GraphQL.org/users.
However, with some many hundreds of thousands of REST APIs publicly available today (and many thousands others available internally), what are the implications of moving to GraphQL? Is it really worth the effort of replacing REST APIs specially if they’re successful and performing well in production? What are the pros/cons of using GraphQL? What tools / languages can be used for GraphQL? What about API Gateways? What about API design?
With a combination of rich content and hands-on demonstrations, attend this session for a point of view on how address these and many other questions, and most importantly get a better understanding and when/where/why/if GraphQL applies for your organisation or specific use case.
This document outlines an agenda and logistics for a training on Neo4j fundamentals and Cypher. It introduces graph concepts like nodes, relationships, and properties. It discusses why graphs are useful and shows examples of real-world domains that can be modeled as graphs. The training will cover introductory Cypher concepts like creating and matching patterns, and modeling exercises like representing a social network or movie genres graph. Logistics are provided like the WiFi password and a suggestion to work together in pairs on exercises.
Overview of GraphQL
How it is different from REST
When you should consider using it and when you should not
Incremental demos until calling GraphQL from an React application: https://github.com/bary822/graphQL-techtalk
This document provides an overview agenda for a Neo4j webinar. It introduces the presenters, Riccardo Ciarlo and Ivan Zoratti, and outlines the following topics: an introduction to Neo4j, what a graph database is, key use cases and how Neo4j enables them to be effective and fast, exploring and visualizing graphs, creating queries for the Neo4j database, and a question and discussion period.
Learn how to build advanced GraphQL queries, how to work with filters and patches and how to embed GraphQL in languages like Python and Java. These slides are the second set in our webinar series on GraphQL.
With the introduction of the Neo4j Graph Platform and increased adoption of graph database technology across all industries, now is a better time than ever to get started with graphs.
Join us for this introduction to Neo4j and graph databases. We'll discuss the primary use cases for graph databases and explore the properties of Neo4j that make those use cases possible.
The document provides an overview and introduction to Neo4j, a graph database. It discusses what graphs and Neo4j are, how to model data in a graph versus SQL, the Cypher query language to interact with Neo4j, and demonstrates Neo4j through the browser. It concludes by suggesting next steps to download Neo4j, choose a driver, join the community, and attend upcoming events.
This document provides an overview of graph databases and Neo4j. It begins with an introduction to graph databases and their advantages over relational databases for modeling connected data. Examples of real-world use cases that are well-suited for graph databases are given. The document then describes the core components of the graph data model including nodes, relationships, properties, and labels. It provides examples of how to model data as a graph and query graphs using Cypher, the query language for Neo4j. The document concludes by discussing Neo4j as an example of a graph database and its key features and capabilities.
Just a few years back, lack of a standard way to document, govern or describe a contract for the APIs acted as a deterrent to API adoption within the enterprise. WSDL 2.0 and WADL provided early support, but they couldn’t truly capture the essence of RESTful APIs. Recently we have seen the emergence of several description languages. New ways to describe and document APIs have emerged such as Swagger, RAML, API Blueprint and others, each taking a slightly different approach.
GraphQL is a wonderful abstraction for describing and querying data. Apollo is an ambitious project to help you build apps with GraphQL. In this talk, we'll go over how all the parts—Client, Server, Dev Tools, Codegen, and more—create an end-to-end experience for building apps on top of any data.
## Detailed description
In today's development ecosystem, there are tons of options for almost every part of your application development process: UI rendering, styling, server side rendering, build systems, type checking, databases, frontend data management, and more. However, there's one part of the stack that hasn't gotten as much love in the last decade, because it usually falls in the cracks between frontend and backend developers: Data fetching.
The most common way to load data in apps today is to use a REST API on the server and manage the data manually on the client. Whether you're using Redux, MobX, or something else, you're usually doing everything yourself—deciding when to load data, how to keep it fresh, updating the store after sending updates to the server, and more. But if you're trying to develop the best user experience for your app, all of that gets in the way; you shouldn't have to become a systems engineer to create a great frontend. The Apollo project is based on the belief that data loading doesn't have to be complicated; instead, you should be able to easily get the data you want, when you want it, and it should be managed for you just like React manages updating your UI.
Because data loading touches both the frontend and backend of your app, GraphQL and Apollo have to include many parts to fulfill that promise of being able to seamlessly connect your data together. First, we need client libraries not only for React and JavaScript, but also for native iOS and Android. Then, we must bring server-side support for GraphQL queries, mutations, and most recently subscriptions to every server technology and make those servers easier to write. And finally, we want not only all of the tools that people are used to with REST APIs, but many more thanks to all of the capabilities enabled by GraphQL.
In this talk, we'll go over all of the parts of a GraphQL-oriented app architecture, and how different GraphQL and Apollo technologies come together to solve all of the parts of data loading and management for React developers.
Introduction to Neo4j for the Emirates & BahrainNeo4j
This document provides an agenda and overview of a Neo4j presentation. It discusses Neo4j as the leading native graph database, its graph data science capabilities, and deployment options like Neo4j Aura and Cloud Managed Services. Success stories are highlighted like Minka using Neo4j Aura to power Colombia's new real-time ACH payments system. The presentation aims to demonstrate Neo4j's technology, use cases, and how it can drive business value through connecting data.
An Introduction to NOSQL, Graph Databases and Neo4jDebanjan Mahata
Neo4j is a graph database that stores data in nodes and relationships. It allows for efficient querying of connected data through graph traversals. Key aspects include nodes that can contain properties, relationships that connect nodes and also contain properties, and the ability to navigate the graph through traversals. Neo4j provides APIs for common graph operations like creating and removing nodes/relationships, running traversals, and managing transactions. It is well suited for domains that involve connected, semi-structured data like social networks.
This document is a presentation on GraphQL fundamentals. It was created by Virbhadra S. Ankalkote from BORN Group. The presentation covers what GraphQL is, who created it, why it was created, and how it works. It defines GraphQL as a query language for APIs that fulfills queries with existing data. It notes that Facebook developed GraphQL in 2012 for their native mobile app. In comparison to REST APIs, GraphQL allows clients to get precisely the data they need in one request. The presentation explains the GraphQL specification and includes sections on reading and writing data, using variables and fragments, and limitations such as indefinite querying depth.
Postman Webinar: "API Governance with Postman"Postman
Proper API governance can help you deliver more consistent APIs. Join Postman Chief Evangelist (and governance fanatic) Kin Lane in this webinar to learn essential elements of API governance using Postman. Kin will show you how the OpenAPI Specification and Postman Collections can help you test the results of each API while you measure, standardize, report, and govern APIs at scale.
The talk covers the following topics:
* Fundamental parts of a GraphQL server
* Defining API shape - GraphQL schema
* Resolving object fields
* Mutative APIs
* Making requests to a GraphQL server
* Solving N+1 query problem: dataloader
This document provides an overview and agenda for a workshop on building a full stack GraphQL application using Neo4j AuraDB, Next.js, and Vercel. The agenda includes introductions to Neo4j AuraDB, building GraphQL APIs, Next.js, and deploying to Vercel. Hands-on exercises will have attendees create a Neo4j AuraDB instance, build GraphQL APIs backed by Neo4j, develop a Next.js frontend application, and deploy the full stack application to Vercel.
Tutorial: Building a GraphQL API in PHPAndrew Rota
This document discusses building a GraphQL API in PHP. It provides an overview of GraphQL concepts like queries, fields, types and schemas. It then outlines the steps to build a GraphQL API in PHP using the graphql-php library:
1. Define object types and the Query root type in the schema
2. Initialize the GraphQL schema instance
3. Execute GraphQL queries against the schema and return the result
By following these steps, one can build an API for querying a database of PHP conferences and speakers to understand how to build GraphQL APIs in PHP.
Building Fullstack Serverless GraphQL APIs In The CloudNordic APIs
Follow along as we build a GraphQL API using Apollo and Neo4j Database. We’ll show how to leverage the scale of serverless for our GraphQL API and how to take advantage of 3rd party services like Auth0 for handling authentication and authorization in our GraphQL app.
How easy (or hard) it is to monitor your graph ql service performanceRed Hat
- GraphQL performance monitoring can be challenging as queries can vary significantly even when requesting the same data. Traditional endpoint monitoring provides little insight.
- Distributed tracing using OpenTracing allows tracing queries to monitor performance at the resolver level. Tools like Jaeger and plugins for Apollo Server and other GraphQL servers can integrate tracing.
- A demo showed using the Apollo OpenTracing plugin to trace a query through an Apollo server and resolver to an external API. The trace data was sent to Jaeger for analysis to help debug performance issues.
Sashko Stubailo - The GraphQL and Apollo Stack: connecting everything togetherReact Conf Brasil
Apresentado na React Conf Brasil, em São Paulo, 7 de Outubro de 2017 #reactconfbr
I’ve been exploring the space of declarative developer tools and frameworks for over five years. Most recently, I was the founding member of the Apollo project at Meteor Development Group. My greatest passion is to make software development simpler, and enable more people to create software to bring good to the world.
https://medium.com/@stubailo
@stubailo
- Patrocínio: Pipefy, Globo.com, Meteor, Apollo, Taller, Fullcircle, Quanto, Udacity, Cubos, Segware, Entria
- Apoio: Concrete, Rung, LuizaLabs, Movile, Rivendel, GreenMile, STQ, Hi Platform
- Promoção: InfoQ, DevNaEstrada, CodamosClub, JS Ladies, NodeBR, Training Center, BrazilJS, Tableless, GeekHunter
- Afterparty: An English Thing
Full Stack Development with Neo4j and GraphQLNeo4j
The document discusses using GraphQL with Neo4j databases. It provides an overview of GraphQL, how to build a GraphQL service including defining a schema and implementing resolver functions. It also discusses Neo4j-GraphQL integrations which can automatically generate Cypher queries from GraphQL, improving performance by batching data fetching and allowing exposing Cypher queries through GraphQL directives. The neo4j-graphql library facilitates integrating Neo4j with GraphQL services.
Getting Started with Spring for GraphQLVMware Tanzu
WaffleCorp is a major provider of breakfast products available direct to consumer or through our strategic partnerships. The current implementation of the e-commerce platform is a monolithic Spring MVC application that serves data through a collection of REST APIs.
Currently, the only provider of the REST API is our e-commerce web application. We've been tasked with opening up our APIs to our new iOS and Android apps, partner microservices, and IoT applications.
The issue we ran into is that a REST API is not a one-size-fits-all approach. We need a more flexible solution to meet the requirements of all of our client applications. This is a perfect use case for the speed and flexibility of GraphQL.
GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.
In this session, you’ll learn what GraphQL is and why you should consider it in your next project. You’ll learn how to use GraphQL in your Spring Boot applications by leveraging the Spring for GraphQL project. By the end of this session, you’ll understand how to stand up a GraphQL endpoint and request the data you need, and nothing more.
All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...GreeceJS
In this presentation, we explore application development using the GRAND stack (GraphQL, React, Apollo, Neo4j) for building web applications backed by a graph database. We will review the components to build a simple web application, including how to build a React component, an introduction to JSX, an overview of GraphQL and why it is a game-changer for front-end development. We'll learn how to model, store, and query data in the Neo4j graph database using GraphQL to power our web application.
This document discusses API management for GraphQL APIs. It begins with an introduction to GraphQL and then covers how API management platforms can support GraphQL APIs, including developer portals, enforcing security and policies at the gateway, and analytics. Key capabilities for GraphQL API management include importing GraphQL schemas, analyzing query complexity, enforcing rate limits on operations, and providing insights into usage patterns and latency from analytics. The document emphasizes that GraphQL is a good fit for some problems but API management is still needed to maximize benefits for both GraphQL API providers and consumers.
GraphQL is a query language for APIs that allows clients to request specific data rather than entire resources. It addresses common problems with REST APIs like over-fetching data. Several GraphQL libraries exist for Java including graphql-java, graphql-java-kickstart, graphql-dgs-framework, and spring-graphql. These libraries differ in features like code generation, error handling, testing support, and available clients. Spring GraphQL is considered the most mature option as it integrates directly with Spring Boot and allows testing all code.
It is a basic presentation which can help you understand the basic concepts about Graphql and how it can be used to resolve the frontend integration of projects and help in reducing the data fetching time
This presentation also explains the core features of Graphql and why It is a great alternative for REST APIs along with the procedure with which we can integrate it into our projects
GraphQL is a query language for APIs that was created by Facebook in 2012. It allows clients to define the structure of the data required, and exactly the data they need from the server. This prevents over- and under-fetching of data. GraphQL has grown in popularity with the release of tools like Apollo and GraphQL code generation. GraphQL can be used to build APIs that integrate with existing backend systems and databases, with libraries like Express GraphQL and GraphQL Yoga making it simple to create GraphQL servers.
GraphQL is query language for APIs, but what are the advantages and how would one implement such in their microservices/APIs. In this session, I will go through the basics of GraphQL, different aspects of GraphQL and architecture of such APIs. How 4 different ways we can implement GraphQL for a Springboot microservice/API.
GraphQL and Neo4j - Simple and Intelligent Modern AppsNeo4j
This document discusses using GraphQL and Neo4j together for building modern applications. It notes that the Neo4j GraphQL library allows for low-code, secure and flexible querying of graph data from Neo4j using GraphQL. An example is provided showing how a GraphQL query is translated to a Cypher query to retrieve movie title and runtime data from Neo4j.
This document discusses how GraphQL and graph databases are well-suited for each other. GraphQL allows clients to request specific data in a hierarchical format, while graph databases are optimized for traversing relationships. Translating a GraphQL query to a single graph database query could prevent the "N+1 queries problem" and improve performance. The document demonstrates a proof of concept for translating GraphQL queries to queries in Neo4j and OrientDB graph databases.
In questa breve presentazione vedremo cosa è e cosa ci permette di fare GraphQL, e come questo nuovo approccio alle API possa essere integrato ad una GraphDB in modo efficiente
GraphQL is query language for APIs, but what are the advantages and how would one implement such in their microservices/APIs. In this session, I will go through the basics of GraphQL, different aspects of GraphQL and architecture of such APIs. There will be a demo/live-coding on, how 4 different ways we can implement GraphQL for a Springboot microservice/API. Lots of examples, live coding and helpful comparison on structure, usage and implementations of GraphQL in Springboot & Java world.
Similar to Training Series: Build APIs with Neo4j GraphQL Library (20)
Atelier - Architecture d’applications de Graphes - GraphSummit ParisNeo4j
Atelier - Architecture d’applications de Graphes
Participez à cet atelier pratique animé par des experts de Neo4j qui vous guideront pour découvrir l’intelligence contextuelle. En utilisant un jeu de données réel, nous construirons étape par étape une solution de graphes ; de la construction du modèle de données de graphes à l’exécution de requêtes et à la visualisation des données. L’approche sera applicable à de multiples cas d’usages et industries.
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j
Dr. Jesús Barrasa, Head of Solutions Architecture for EMEA, Neo4j
Découvrez les dernières innovations de Neo4j, et notamment les dernières intégrations cloud et les améliorations produits qui font de Neo4j un choix essentiel pour les développeurs qui créent des applications avec des données interconnectées et de l’IA générative.
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j
Dr. Jesús Barrasa, Head of Solutions Architecture for EMEA, Neo4j
Découvrez les dernières innovations de Neo4j, et notamment les dernières intégrations cloud et les améliorations produits qui font de Neo4j un choix essentiel pour les développeurs qui créent des applications avec des données interconnectées et de l’IA générative.
SOPRA STERIA - GraphRAG : repousser les limitations du RAG via l’utilisation ...Neo4j
Romain CAMPOURCY – Architecte Solution, Sopra Steria
Patrick MEYER – Architecte IA Groupe, Sopra Steria
La Génération de Récupération Augmentée (RAG) permet la réponse à des questions d’utilisateur sur un domaine métier à l’aide de grands modèles de langage. Cette technique fonctionne correctement lorsque la documentation est simple mais trouve des limitations dès que les sources sont complexes. Au travers d’un projet que nous avons réalisé, nous vous présenterons l’approche GraphRAG, une nouvelle approche qui utilise une base Neo4j générée pour améliorer la compréhension des documents et la synthèse d’informations. Cette méthode surpasse l’approche RAG en fournissant des réponses plus holistiques et précises.
ADEO - Knowledge Graph pour le e-commerce, entre challenges et opportunités ...Neo4j
Charles Gouwy, Business Product Leader, Adeo Services (Groupe Leroy Merlin)
Alors que leur Knowledge Graph est déjà intégré sur l’ensemble des expériences d’achat de leur plateforme e-commerce depuis plus de 3 ans, nous verrons quelles sont les nouvelles opportunités et challenges qui s’ouvrent encore à eux grâce à leur utilisation d’une base de donnée de graphes et l’émergence de l’IA.
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Maruthi Prithivirajan, Head of ASEAN & IN Solution Architecture, Neo4j
Get an inside look at the latest Neo4j innovations that enable relationship-driven intelligence at scale. Learn more about the newest cloud integrations and product enhancements that make Neo4j an essential choice for developers building apps with interconnected data and generative AI.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
GraphAware - Transforming policing with graph-based intelligence analysisNeo4j
Petr Matuska, Sales & Sales Engineering Lead, GraphAware
Western Australia Police Force’s adoption of Neo4j and the GraphAware Hume graph analytics platform marks a significant advancement in data-driven policing. Facing the challenges of growing volumes of valuable data scattered in disconnected silos, the organisation successfully implemented Neo4j database and Hume, consolidating data from various sources into a dynamic knowledge graph. The result was a connected view of intelligence, making it easier for analysts to solve crime faster. The partnership between Neo4j and GraphAware in this project demonstrates the transformative impact of graph technology on law enforcement’s ability to leverage growing volumes of valuable data to prevent crime and protect communities.
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesNeo4j
David Pond, Lead Product Manager, Neo4j
Get an inside look at the latest Neo4j innovations that enable relationship-driven intelligence at scale. Learn more about the newest cloud integrations and product enhancements that make Neo4j an essential choice for developers building apps with interconnected data and generative AI.
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISTier1 app
Are you ready to unlock the secrets hidden within Java thread dumps? Join us for a hands-on session where we'll delve into effective troubleshooting patterns to swiftly identify the root causes of production problems. Discover the right tools, techniques, and best practices while exploring *real-world case studies of major outages* in Fortune 500 enterprises. Engage in interactive lab exercises where you'll have the opportunity to troubleshoot thread dumps and uncover performance issues firsthand. Join us and become a master of Java thread dump analysis!
The Rising Future of CPaaS in the Middle East 2024Yara Milbes
Explore "The Rising Future of CPaaS in the Middle East in 2024" with this comprehensive PPT presentation. Discover how Communication Platforms as a Service (CPaaS) is transforming communication across various sectors in the Middle East.
Liberarsi dai framework con i Web Component.pptxMassimo Artizzu
In Italian
Presentazione sulle feature e l'utilizzo dei Web Component nell sviluppo di pagine e applicazioni web. Racconto delle ragioni storiche dell'avvento dei Web Component. Evidenziazione dei vantaggi e delle sfide poste, indicazione delle best practices, con particolare accento sulla possibilità di usare web component per facilitare la migrazione delle proprie applicazioni verso nuovi stack tecnologici.
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...XfilesPro
Wondering how X-Sign gained popularity in a quick time span? This eSign functionality of XfilesPro DocuPrime has many advancements to offer for Salesforce users. Explore them now!
Nashik's top web development company, Upturn India Technologies, crafts innovative digital solutions for your success. Partner with us and achieve your goals
Superpower Your Apache Kafka Applications Development with Complementary Open...Paul Brebner
Kafka Summit talk (Bangalore, India, May 2, 2024, https://events.bizzabo.com/573863/agenda/session/1300469 )
Many Apache Kafka use cases take advantage of Kafka’s ability to integrate multiple heterogeneous systems for stream processing and real-time machine learning scenarios. But Kafka also exists in a rich ecosystem of related but complementary stream processing technologies and tools, particularly from the open-source community. In this talk, we’ll take you on a tour of a selection of complementary tools that can make Kafka even more powerful. We’ll focus on tools for stream processing and querying, streaming machine learning, stream visibility and observation, stream meta-data, stream visualisation, stream development including testing and the use of Generative AI and LLMs, and stream performance and scalability. By the end you will have a good idea of the types of Kafka “superhero” tools that exist, which are my favourites (and what superpowers they have), and how they combine to save your Kafka applications development universe from swamploads of data stagnation monsters!
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...kalichargn70th171
In today's fiercely competitive mobile app market, the role of the QA team is pivotal for continuous improvement and sustained success. Effective testing strategies are essential to navigate the challenges confidently and precisely. Ensuring the perfection of mobile apps before they reach end-users requires thoughtful decisions in the testing plan.
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...Luigi Fugaro
Vector databases are transforming how we handle data, allowing us to search through text, images, and audio by converting them into vectors. Today, we'll dive into the basics of this exciting technology and discuss its potential to revolutionize our next-generation AI applications. We'll examine typical uses for these databases and the essential tools
developers need. Plus, we'll zoom in on the advanced capabilities of vector search and semantic caching in Java, showcasing these through a live demo with Redis libraries. Get ready to see how these powerful tools can change the game!
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Paul Brebner
Closing talk for the Performance Engineering track at Community Over Code EU (Bratislava, Slovakia, June 5 2024) https://eu.communityovercode.org/sessions/2024/why-apache-kafka-clusters-are-like-galaxies-and-other-cosmic-kafka-quandaries-explored/ Instaclustr (now part of NetApp) manages 100s of Apache Kafka clusters of many different sizes, for a variety of use cases and customers. For the last 7 years I’ve been focused outwardly on exploring Kafka application development challenges, but recently I decided to look inward and see what I could discover about the performance, scalability and resource characteristics of the Kafka clusters themselves. Using a suite of Performance Engineering techniques, I will reveal some surprising discoveries about cosmic Kafka mysteries in our data centres, related to: cluster sizes and distribution (using Zipf’s Law), horizontal vs. vertical scalability, and predicting Kafka performance using metrics, modelling and regression techniques. These insights are relevant to Kafka developers and operators.
Boost Your Savings with These Money Management AppsJhone kinadey
A money management app can transform your financial life by tracking expenses, creating budgets, and setting financial goals. These apps offer features like real-time expense tracking, bill reminders, and personalized insights to help you save and manage money effectively. With a user-friendly interface, they simplify financial planning, making it easier to stay on top of your finances and achieve long-term financial stability.
Orca: Nocode Graphical Editor for Container OrchestrationPedro J. Molina
Tool demo on CEDI/SISTEDES/JISBD2024 at A Coruña, Spain. 2024.06.18
"Orca: Nocode Graphical Editor for Container Orchestration"
by Pedro J. Molina PhD. from Metadev
WWDC 2024 Keynote Review: For CocoaCoders AustinPatrick Weigel
Overview of WWDC 2024 Keynote Address.
Covers: Apple Intelligence, iOS18, macOS Sequoia, iPadOS, watchOS, visionOS, and Apple TV+.
Understandable dialogue on Apple TV+
On-device app controlling AI.
Access to ChatGPT with a guest appearance by Chief Data Thief Sam Altman!
App Locking! iPhone Mirroring! And a Calculator!!
DevOps Consulting Company | Hire DevOps Servicesseospiralmantra
Spiral Mantra excels in providing comprehensive DevOps services, including Azure and AWS DevOps solutions. As a top DevOps consulting company, we offer controlled services, cloud DevOps, and expert consulting nationwide, including Houston and New York. Our skilled DevOps engineers ensure seamless integration and optimized operations for your business. Choose Spiral Mantra for superior DevOps services.
https://www.spiralmantra.com/devops/
The Comprehensive Guide to Validating Audio-Visual Performances.pdfkalichargn70th171
Ensuring the optimal performance of your audio-visual (AV) equipment is crucial for delivering exceptional experiences. AV performance validation is a critical process that verifies the quality and functionality of your AV setup. Whether you're a content creator, a business conducting webinars, or a homeowner creating a home theater, validating your AV performance is essential.
3. Graph Database
● Database management system (DBMS)
● Property Graph data model
● Cypher query language
● Graph analytics
● Data visualization
● Neo4j Aura database-as-a-service
● GraphQL integration for building
GraphQL APIs
What is Neo4j?
neo4j.com
4. Neo4j, Inc. All rights reserved 2021
4
The Neo4j Graph Data Platform
Analytics &
Data Science
Tooling
Graph
Transactions
Data Orchestration
Development &
Administration
Drivers & APIs Discovery & Visualization
Graph
Analytics
AI
BUSINESS USERS
DEVELOPERS
ADMINS
DATA
ANALYSTS
DATA
SCIENTISTS
APPLICATIONS
Cloud
5. Building GraphQL APIs With The Neo4j GraphQL Library
Agenda
Modules:
● Intro to GraphQL
● Neo4j GraphQL Library Overview
● Custom Logic With Cypher
● Authorization
Hands-On exercises using:
● Neo4j Aura Free Tier
● CodeSandbox
○ Link in each module to starter code
○ "Fork" sandbox during exercise
Hands-On
Exercise
8. What Is GraphQL?
GraphQL is an API query language and runtime for fulfilling those queries.
GraphQL uses a type system to define the data available in the API, including what
entities and attributes (types and fields in GraphQL parlance) exist and how types
are connected (the data graph).
GraphQL operations (queries, mutations, or subscriptions) specify an entry-point and
a traversal of the data graph (the selection set) which defines what fields to be
returned by the operation.
graphql.org
9. GraphQL Concepts - Type Definitions
GraphQL type definitions define the
data available in the API.
These type definitions are typically
defined using the GraphQL Schema
Definition Language (SDL), a
language-agnostic way of expressing
the types.
However, type definitions can be also
be defined programmatically.
10. GraphQL Concepts - GraphQL Operations
Each GraphQL operation is either
a Query, Mutation, or
Subscription.
11. GraphQL Concepts - GraphQL Operations
Each GraphQL operation is either
a Query, Mutation, or
Subscription.
The fields of the Query, Mutation,
and Subscription types define the
entry points for an operation.
Each operation starts at the field
of one of these types.
Entry point &
arguments
12. GraphQL Concepts - Selection Set
The selection set specifies the
fields to be returned by a
GraphQL operation.
Can be thought of as a traversal
through the data graph.
Selection set
13. GraphQL Concepts - Selection Set
The response to a GraphQL operation matches the shape of the
selection set, returning on the data requested.
Selection set
14. GraphQL Concepts - Resolver Functions
GraphQL resolvers are the
functions responsible for actually
fulfilling the GraphQL operation.
In the context of a query, this
means fetching data from a data
layer.
NOTE: The Neo4j GraphQL Library
auto-generates resolver functions for us,
but this is an important GraphQL concept
to understand
15. Benefits Of GraphQL
● Overfetching - sending less data over the wire
● Underfetching - everything the client needs in a single request
● The GraphQL specification defines exactly what GraphQL is
● Simplify data fetching with component-based data interactions
● "Graphs all the way down" - GraphQL can help unify disparate systems and
focus API interactions on relationships instead of resources.
● Developer productivity - By reasoning about application data as a graph with
a strict type system, developers can focus on building applications.
16. GraphQL Challenges
● Some well understood practices from REST don’t apply
○ HTTP status codes
○ Error handling
○ Caching
● Exposing arbitrary complexity to the client and performance considerations
● The n+1 query problem - the nested nature of GraphQL operations can lead to multiple
requests to the data layer(s) to resolve a request
● Query costing and rate limiting
Best practices and tooling have emerged to address all of the above, however it’s important
to be aware of these challenges.
17. GraphQL Tooling - GraphQL Playground
GraphQL Playground is an
in-browser tool for querying and
exploring GraphQL APIs.
View API documentation using
GraphQL's introspection feature.
18. GraphQL Tooling - GraphQL Playground
Open movies.neo4j-graphql.com
● Explore the "Docs" tab to learn more about the API schema
● Run these GraphQL queries:
Hands On
Exercise
{
movies(options: { limit: 10 }) {
title
actors {
name
}
}
}
{
directors(where: {name:"Robert Redford"}) {
name
directed {
title
plot
}
}
}
● Try modifying the query selection set to return additional fields
○ Try using ctrl+space for auto-complete
○ What can you find?
20. Neo4j Aura Free Tier Setup
Let's create a Neo4j Aura Free instance that we'll use for the rest of the workshop...
Hands-On
Exercise
Once your Neo4j Aura instance is online you'll see the connection string
(neo4j+s://xxxxx.databases.neo4j.io)
Be sure to take note of the generated
password!
It will then take a few moments for your
Neo4j Aura instance to be provisioned.
Sign in to Neo4j Aura:
dev.neo4j.com/aura-login
Select "Create a new
database" button.
Choose the "Free" tier.
Enter a name for your
Neo4j Aura instance
and select "Create
database"
Step 1: Step 2:
Step 3:
22. The Neo4j GraphQL Library
For building Node.js GraphQL APIs with Neo4j.
The fundamental goal of the Neo4j GraphQL Library is to make it easier to
build GraphQL APIs backed by Neo4j.
23. Goals Of The Neo4j GraphQL Library
GraphQL First Development
GraphQL type definitions can drive the database data model, which means we
don’t need to maintain two separate schemas for our API and database.
24. Goals Of The Neo4j GraphQL Library
Auto-generate GraphQL API Operations
With the Neo4j GraphQL Library,
GraphQL type definitions provide the
starting point for a generated API that
includes:
● Query & Mutation types (an API
entrypoint for each type defined in
the schema)
● Ordering
● Pagination
● Complex filtering
● DateTime & Spatial types and
filtering
25. Goals Of The Neo4j GraphQL Library
Generate Cypher From GraphQL Operations
To reduce boilerplate and optimize for performance the Neo4j GraphQL Library
automatically generates a single database query for any arbitrary GraphQL request.
This means the developer does not need to implement resolvers and each GraphQL
operation results in a single roundtrip to the database.
26. Goals Of The Neo4j GraphQL Library
Extend GraphQL With Cypher
To add custom logic beyond CRUD operations, you can use the @cypher
GraphQL schema directive to add computed fields bound to a Cypher query to
the GraphQL schema.
29. Neo4j GraphQL Library Quickstart
Start GraphQL server:
This will start a local GraphQL API and will also serve the GraphQL
Playground IDE for querying the API or exploring documentation using
GraphQL’s introspection feature.
30. Building An Online Bookstore GraphQL API
For the rest of the workshop we will be building
an API for an online bookstore.
First, we need to define our data model.
The graph data modeling process:
1. Identify entities → Nodes
2. What are the attributes of these entities? → Properties
3. How are these entities connected? → Relationships
4. Can you traverse the graph to answer the business
requirements of your application?
31. Setting Up Our Environment
● Open this Codesandbox
● Add your Neo4j Aura connection details to the .env file (NEO4J_URI,
NEO4J_USER, & NEO4J_PASSWORD environment variables)
○ You will need to sign in to Codesandbox to save your updates
● In GraphQL Playground (running in Codesandbox), run the following GraphQL
query (you'll have an empty result set, but shouldn't see any errors):
Hands-On
Exercise
{
books {
title
}
}
32. Neo4j Aura Free Tier Setup
Let's create a Neo4j Aura Free instance that we'll use for the rest of the workshop and connect to our GraphQL API in CodeSandbox
Hands-On
Exercise
Update the Codesandbox .env file with your Neo4j credentials:
Once your Neo4j Aura instance is online you'll see the connection string
(neo4j+s://xxxxx.databases.neo4j.io)
Be sure to take note of the generated
password!
It will then take a few moments for your
Neo4j Aura instance to be provisioned.
Sign in to Neo4j Aura:
dev.neo4j.com/neo4j-aura
Select "Create a new
database" button.
Choose the "Free" tier.
Enter a name for your
Neo4j Aura instance
and select "Create
database"
Step 1: Step 2:
Step 3: Step 4:
33. Neo4j Sandbox Setup
If you have issues with Neo4j Aura you can also use Neo4j Sandbox
Hands-On
Exercise
Update the Codesandbox .env file with your Neo4j credentials:
Take note of your Neo4j Sandbox Bolt URL and password
Sign in to Neo4j
Sandbox:
dev.neo4j.com/sandbox
Select "Blank
Sandbox"
Select "Launch Project"
Step 1: Step 2:
Step 3:
35. Defining A Property Graph Model With GraphQL
Schema Directives
The @relationshipdirective is used to define
relationships.
DateTime and Point scalar types are available and
map to the equivalent native Neo4j database types.
The @timestamp directive is used to indicate the
property will be automatically updated when the node
is created and updated.
The @id directive marks a field as a unique identifier
and enables auto-generation when the node is
created.
More on directives in the documentation.
36. Creating Data - Generated Mutations
mutation {
createBooks(
input: {
isbn: "1492047686"
title: "Graph Algorithms"
price: 37.48
description:
"Practical Examples in Apache Spark and Neo4j"
}
) {
books {
isbn
title
price
description
__typename
}
}
}
37. Creating Data - Generated Mutations
mutation {
createReviews(
input: {
rating: 5
text: "Best overview of graph data science!"
book: { connect: { where: { node: { title: "Graph Algorithms" } } } }
}
) {
reviews {
rating
text
createdAt
book {
title
}
}
}
}
41. Querying With GraphQL - Query Fields
By default, each type defined in the
GraphQL type definitions will have a
GraphQL Query field generated and
added to the Query type as the
pluralized name of the type (for
example the type Movie becomes a
Query field movies). Each query
field is an entry point into the
GraphQL API. Since GraphQL types
are mapped to node labels in
Neo4j, you can think of the Query
field as the starting point for a
traversal through the graph.
42. Querying With GraphQL - Query Fields
The response data matches
the shape of our GraphQL
query - as we add more fields
to the GraphQL selection set
those fields are included in the
response object.
43. A sorting input type is
generated for each type in the
GraphQL type definitions,
allowing for Query results to
be sorted by each field using
the options field argument.
Querying With GraphQL - Sorting & Pagination
Offset-based pagination is available
by passing skip and limit values as
part of the options argument.
"Count queries" allow us to
calculate the total number of pages.
Offset-Based Pagination
44. Querying With GraphQL - Sorting & Pagination
Cursor-based pagination can be used on relationship fields using Relay-style "Connection" types.
See the documentation for more details.
Cursor-Based Pagination
45. Querying With GraphQL - Filtering
Query results can be filtered using
the where argument. Filter inputs
are generated for each field and
expose comparison operators
specific to the type of the field. For
example, for numeric fields filter
input operators include equality,
greater than (_GT), less than (_LT),
etc. String fields expose the
common string comparison
operators such as
_STARTS_WITH, _CONTAINS,
_ENDS_WITH, etc.
46. Querying With GraphQL - Filtering (Nested)
We can also use the where
argument in nested selections
to filter relationships. Here we
are filtering for reviews
created after Jan 1, 2021
using the createdAt_GT filter
input on the createdAt
DateTime type, specifying the
date using the ISO format.
47. Querying With GraphQL - Geo Distance
For Point fields we can filter
results by the distance to
another point. Here we search
for addresses within 1km of a
specified point
48. Querying With GraphQL - Filtering Using Relationships
Let’s look at an example that
applies filtering at the root of our
query, but using a relationship.
Let’s say we want to search for
all orders where the shipTo
address is within 1km of a
certain point. To do that we’ll use
the where argument at the root
of the query (in the orders Query
field), but use a nested input to
specify we want to filter using the
shipTo relationship and the
corresponding Address node.
49. Exercise: Updating The GraphQL Schema
● Update schema.graphql adding Author and Subject types to our
GraphQL schema
● Once updated, write GraphQL mutations to add authors and subjects to
the graph:
Hands-On
Exercise
Title Author(s)
Inspired Marty Cagan
Ross Poldark Winston Graham
Graph Algorithms Mark Needham, Amy E.
Hodler
Title Subject(s)
Inspired Product management, Design
Ross Poldark Historical fiction, Cornwall
Graph Algorithms Graph theory, Neo4j
If you get stuck you can find the solutions in the README.md file in this Codesandbox.
52. 52
Adding Custom Logic To The GraphQL API
Custom Resolvers
● Implement field resolver
function with your custom logic
● Resolver function will be called
after initial data is fetched from
Neo4j
@cypher GraphQL Schema
Directive
● Add custom Cypher statements
to the GraphQL schema
● Single Cypher query is
generated / one round trip to
the database
52
53. Cypher GraphQL Schema Directive
Computed Scalar Field
With the @cypher schema directive in the Neo4j GraphQL Library we can add a field subTotal to our Order type
that includes the logic for traversing to the associated Book nodes and summing the price property value of each
book.
Here we use the extend type syntax of GraphQL SDL but we could also add this field directly to the Order type
definition as well.The @cypher directive takes a single argument statement which is the Cypher statement to be
executed to resolve the field. This Cypher statement can reference the this variable which is the currently
resolved node, in this case the currently resolved Order node.
54. Cypher GraphQL Schema Directive
Computed Scalar Field We can now include the subTotal
field in our selection set to
execute the custom Cypher
query...
55. Cypher GraphQL Schema Directive
Node & Object Fields
In addition to scalar fields we can also use @cypher directive fields on object and
object array fields with Cypher queries that return nodes or objects.
Let’s add a recommended field to the Customer type, returning books the customer
might be interested in purchasing based on their order history and the order history
of other customers in the graph.
56. Cypher GraphQL Schema Directive
Node & Object Fields
Now we can use this recommended
field on the Customer type. Since
recommended is an array of Book
objects we need to select the nested
fields we want to be returned - in this
case the title field.
57. Cypher GraphQL Schema Directive
Field Arguments → Cypher Parameters
Any field arguments declared on a GraphQL field with a Cypher directive are passed
through to the Cypher query as Cypher parameters. Let’s say we want the client to be
able to specify the number of recommendations returned. We’ll add a field argument limit
to the recommended field and reference that in our Cypher query as a Cypher parameter.
58. Cypher GraphQL Schema Directive
Field Arguments → Cypher Parameters
We set a default value of 3 for this
limit argument so that if the value
isn’t specified the limit Cypher
parameter will still be passed to the
Cypher query with a value of 3. The
client can now specify the number
of recommended books to return
59. Cypher GraphQL Schema Directive
Node & Object Fields We can also return a map from our Cypher query
when using the @cypher directive on an object or
object array GraphQL field. This is useful when we
have multiple computed values we want to return or
for returning data from an external data layer.
Let’s add weather data for the order addresses so
our delivery drivers know what sort of conditions to
expect. We’ll query an external API to fetch this data
using the apoc.load.json procedure.
First, we’ll add a type to the GraphQL type
definitions to represent this object (Weather), then
we’ll use the apoc.load.json procedure to fetch data
from an external API and return the current
conditions, returning a map from our Cypher query
that matches the shape of the Weather type.
60. Cypher GraphQL Schema Directive
Node & Object Fields
Now we can include the
currentWeather field on the
Address type in our GraphQL
queries.
61. Cypher GraphQL Schema Directive
Custom Query Fields
We can use the @cypher directive on Query fields to compliment the auto-generated Query fields provided by the Neo4j GraphQL
Library. Perhaps we want to leverage a full-text index for fuzzy matching for book searches?
First, in Neo4j Browser, create the full-text index:
CALL db.index.fulltext.createNodeIndex("bookIndex", ["Book"],["title", "description"])
In Cypher we would search using the index like this:
CALL db.index.fulltext.queryNodes("bookIndex", "garph~")
62. Cypher GraphQL Schema Directive
Custom Query Fields
To take advantage of the full text index in our GraphQL API add a bookSearch field to the
Query type in our GraphQL type definitions which requires a searchString argument that
becomes the full-text search term
63. Cypher GraphQL Schema Directive
Custom Query Fields
And we now have a new entry-point to our GraphQL API allowing for
full-text search of book titles and descriptions.
64. Cypher GraphQL Schema Directive
Custom Mutation Fields
Similar to adding Query fields, we can use @cypher schema directives to add new
Mutation fields. This is useful in cases where we have specific logic we’d like to take into
account when creating or updating data. Here we make use of the MERGE Cypher
clause to avoid creating duplicate Subject nodes and connecting them to books.
66. Cypher GraphQL Schema Directive
Custom Resolvers
Combining the power of Cypher and GraphQL is extremely powerful, however there are bound to be some cases where we want to add custom logic using code by
implementing resolver functions. This might be where we want to fetch data from another database, API, or system. Let’s consider a contrived example where we compute an
estimated delivery date using a custom resolver function.
First, we add an estimatedDelivery field to the Order type, including the @ignore directive which indicates we plan to resolve this field manually and it will not be included in
the generated database queries.
Now it’s time to implement our Order.estimatedDelivery resolver function. Our function simply calculates a random date - but the point is that this can be any custom logic we
choose to define.
67. Cypher GraphQL Schema Directive
Custom Resolvers
And now we can reference the estimatedDelivery field in our GraphQL queries.
When this field is included in the selection instead of trying to fetch this field from
the database, our custom resolver will be executed.
68. Exercise: Cypher Schema Directive
● The similar field on the Book type returns recommended
books.
● How could you modify and improve this Cypher query to find
similar books?
Hands-On
Exercise
70. The @auth Directive
The Neo4j GraphQL Library provides an @auth GraphQL schema directive
that enables us to attach authorization rules to our GraphQL type definitions.
The @auth directive uses JSON Web Tokens (JWTs) for authentication.
Authenticated requests to the GraphQL API will include an authorization
header with a Bearer token attached. For example:
POST / HTTP/1.1
authorization: Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MD
IyLCJyb2xlcyI6WyJ1c2VyX2FkbWluIiwicG9zdF9hZG1pbiIsImdyb3VwX2FkbWluIl19.IY0LWqgHcjEtOsOw60mqKazhuRFKroSXFQkp
CtWpgQI
content-type: application/json
71. JSON Web Token (JWT)
JWTs are a standard for
representing and
cryptographically verifying claims
(a JSON payload) securely and
are commonly used for
authentication and authorization.
72. The @auth Directive
isAuthenticated
The isAuthenticated rule is the simplest authorization rule we can add. It means that any GraphQL
operation that accesses a field or object protected by the isAuthenticated rule must have a valid JWT
in the request header.
Let’s make use of the isAuthenticated authorization rule in our bookstore GraphQL API to protect the
Subject type. Let’s say we want to make returning a book’s subjects a "premium" feature to
encourage users to sign-up for our application. To do this we’ll make the following addition to our
GraphQL type definitions, extending the Subject type:
74. The @auth Directive
Roles
Roles are the next type of authorization rule that we will explore. A JWT
payload can include an array of "roles" that describe the permissions
associated with the token.
75. The @auth Directive
Allow
A customer must not be able to view orders placed by other customers.
Adding an Allow rule will allow us to protect orders from other nosy customers.
Here we add a rule to the Order type that a customer’s "sub" (the subject)
claim in the JWT must match the username of the customer who placed the
order.
77. The @auth Directive
Allow
Of course we will also allow admins to have access to orders, so let’s update
the rule to also grant access to any requests with the "admin" role
78. The @auth Directive
Where
In the previous example the client was required to filter for orders that the customer had placed. We don’t always
want to expect the client to include this filtering logic in the GraphQL query. In some cases we simply want to
return whatever data the currently authenticated user has access to. For these cases we can use a Where
authorization rule to apply a filter to the generated database queries - ensuring only the data the user has
access to is returned.
We want a user to only be able to view their own customer information. Here we add a rule to the Customer type
that will apply a filter any time the customer type is accessed that filters for the currently authenticated customer
by adding a predicate that matches the username property to the sub claim in the JWT.
79. The @auth Directive
Where
Note that our query doesn’t specify which customer to return - we’re requesting all customers - but we only get back
the customer that we have access to.
80. The @auth Directive
Bind
Bind allows us to specify connections that must exist in the graph when creating or updating
data based on claims in the JWT.
We want to add a rule that when creating a review, the review node is connected to the
currently authenticated customer - we don’t want customers to be writing reviews on behalf
of other users! This rule means the username of the author of a review must match the sub
claim in the JWT when creating or updating reviews
81. The @auth Directive
Bind
If a customer tries to create a review and connect it to a customer other than
themselves the mutation will return an error.
82. The @auth Directive
@cypher Directive Fields
There are two ways to make use of authorization features when using the
@cypher schema directive:
1) Apply the authorization rules isAuthenticated and roles using the @auth
directive.
2) Reference the JWT payload values in the Cypher query attached to a
@cypher schema directive.
Let’s make use of both of those aspects by adding a Query field that returns
personalized recommendations for a customer!
83. The @auth Directive
@cypher Directive Fields
In our Cypher query we’ll have access to a $auth.jwt parameter that represents the payload of the
JWT. We’ll use that value to look up the currently authenticated customer by username, then traverse
the graph to find relevant recommendations based on their purchase history. We’ll also include the
isAuthenticated rule since we only want authenticated customers to use this Query field.
85. Exercise: Authorization
● Open this Codesandbox which includes the authorization rules defined
above
● Using this admin token create a new user and an order for this user
(be sure to include at least one book in the order!):
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJCb2JMb2JsYXc3Njg3Iiwicm9sZXMiOlsiYWRtaW4iXSwiaWF0IjoxNTE2MjM5MDIyf
Q.f2GKIu31gz39fMJwj5_byFCMDPDy3ncdWOIhhqcwBxk
● Generate a JWT token for your new user using jwt.io
○ Be sure to use this JWT secret when creating the token:
dFt8QaYykR6PauvxcyKVXKauxvQuWQTc
● Next, use this token to add a review for the book purchased by this
user.
● Finally, write a query to view the customer’s details, including their
order history and their reviews.
Hands-On
Exercise
86. Other
● Working with unions & interfaces
● The Neo4j GraphQL OGM
● Working with relationship properties
● ...