This document provides an overview of GraphQL, including:
- GraphQL allows clients to request specific data fields from an API rather than entire resources.
- It addresses limitations of REST such as multiple requests being needed to get related data.
- Many large companies use GraphQL including Facebook, GitHub, and Yelp.
- GraphQL has a type system including object, query, mutation, scalar and other types.
- Examples demonstrate basic GraphQL syntax and concepts like fields, arguments, and fragments.
- Additional resources are provided for learning more about GraphQL.
In this presentation, Suraj Kumar Paul of Valuebound has walked us through GraphQL. Founded by Facebook in 2012, GraphQL is a data query language that provides an alternative to REST and web service architectures.
Here he has discussed core ideas of GraphQL, limitations of RESTful APIs, operations, arguments, fragmentation, variables, mutations etc.
----------------------------------------------------------
Get Socialistic
Our website: http://valuebound.com/
LinkedIn: http://bit.ly/2eKgdux
Facebook: https://www.facebook.com/valuebound/
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.
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
In this presentation, Suraj Kumar Paul of Valuebound has walked us through GraphQL. Founded by Facebook in 2012, GraphQL is a data query language that provides an alternative to REST and web service architectures.
Here he has discussed core ideas of GraphQL, limitations of RESTful APIs, operations, arguments, fragmentation, variables, mutations etc.
----------------------------------------------------------
Get Socialistic
Our website: http://valuebound.com/
LinkedIn: http://bit.ly/2eKgdux
Facebook: https://www.facebook.com/valuebound/
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.
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
With the rise of Microservice Architectures and rich mobile and web applications, APIs are more important than ever. Come learn how to tackle modern API design challenges with GraphQL, an open-source API query language used by Facebook, Amazon, Microsoft, Twitter, Virgin Trains, and more.
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
This presentation was part of an internal training session at Jahia to make people aware of GraphQL, and also shared the lessons learned while working with it. It is intended for audiences that have no prior knowledge of GraphQL.
AWS Mobile Week at the San Francisco Loft
Introduction to GraphQL
GraphQL is a query language for APIs and a runtime for fulfilling those queries. It gives clients the power to ask for exactly what they need, which makes it a great fit for modern web and mobile apps. In this talk, we explain why GraphQL was created, introduce you to the syntax and behavior, and then show how to use it to build powerful APIs for your data. We will also introduce you to AWS AppSync, a GraphQL-powered serverless backend for apps, which you can use to host GraphQL APIs and also add real-time and offline capabilities to your web and mobile apps. You can follow along if you have an AWS account – no GraphQL experience required!
Level: Beginner
Speaker: Rohan Deshpande - Sr. Software Developer Engineer, AWS Mobile Applications
GraphQL is a query language for APIs and a runtime for fulfilling those queries. It gives clients the power to ask for exactly what they need, which makes it a great fit for modern web and mobile apps. In this talk, we explain why GraphQL was created, introduce you to the syntax and behavior, and then show how to use it to build powerful APIs for your data. We will also introduce you to AWS AppSync, a GraphQL-powered serverless backend for apps, which you can use to host GraphQL APIs and also add real-time and offline capabilities to your web and mobile apps. You can follow along if you have an AWS account – no GraphQL experience required!
Level: Beginner
Speaker: Rohan Deshpande - Sr. Software Dev Engineer, AWS Mobile Applications
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 Slid shows the GraphQL Fundamentals, cover below points.
* what: what is GraphQL
* who: Who builds GraphQL
* why: Why we need GraphQL
* how: How to use GraphQL
IT also cover
* Application Programming Interface (API History Image )
* Principles of REST API Design
* REST Flow / GraphQL Flow diagram
* Rest Traditional Data fetching.
* REST vs GraphQL
* Browser Tools
* GraphQL Mutation
* GraphQL Variables
* GraphQL Fragments
* Pain Points of GraphQL
Max Panas (Web Developer @Agile Actors) and Stelios Charbalis (Software Engineer @Agile Actors) present GraphQL and how it compares to traditional REST API design at GreeceJS Meetup #14 (Athens, June 15, 2016).
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)Hafiz Ismail
Talk for FOSSASIA 2016 (http://2016.fossasia.org)
----
This talk will give a brief and enlightening look into how GraphQL can help you address common weaknesses that you, as a web / mobile developer, would normally face with using / building typical REST API systems.
Let's stop fighting about whether we should implement the strictest interpretation of REST or how pragmatic REST-ful design is the only way to go, or debate about what REST is or what it should be.
A couple of demos (In Golang! Yay!) will be shown that are guaranteed to open up your eyes and see that the dawn of liberation for product developers is finally here.
Background: GraphQL is a data query language and runtime designed and used at Facebook to request and deliver data to mobile and web apps since 2012.
Hafiz Ismail (@sogko) is a contributor to Go / Golang implementation of GraphQL server library (https://github.com/graphql-go/graphql) and is looking to encourage fellow developers to join in the collaborative effort.
With the rise of Microservice Architectures and rich mobile and web applications, APIs are more important than ever. Come learn how to tackle modern API design challenges with GraphQL, an open-source API query language used by Facebook, Amazon, Microsoft, Twitter, Virgin Trains, and more.
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
This presentation was part of an internal training session at Jahia to make people aware of GraphQL, and also shared the lessons learned while working with it. It is intended for audiences that have no prior knowledge of GraphQL.
AWS Mobile Week at the San Francisco Loft
Introduction to GraphQL
GraphQL is a query language for APIs and a runtime for fulfilling those queries. It gives clients the power to ask for exactly what they need, which makes it a great fit for modern web and mobile apps. In this talk, we explain why GraphQL was created, introduce you to the syntax and behavior, and then show how to use it to build powerful APIs for your data. We will also introduce you to AWS AppSync, a GraphQL-powered serverless backend for apps, which you can use to host GraphQL APIs and also add real-time and offline capabilities to your web and mobile apps. You can follow along if you have an AWS account – no GraphQL experience required!
Level: Beginner
Speaker: Rohan Deshpande - Sr. Software Developer Engineer, AWS Mobile Applications
GraphQL is a query language for APIs and a runtime for fulfilling those queries. It gives clients the power to ask for exactly what they need, which makes it a great fit for modern web and mobile apps. In this talk, we explain why GraphQL was created, introduce you to the syntax and behavior, and then show how to use it to build powerful APIs for your data. We will also introduce you to AWS AppSync, a GraphQL-powered serverless backend for apps, which you can use to host GraphQL APIs and also add real-time and offline capabilities to your web and mobile apps. You can follow along if you have an AWS account – no GraphQL experience required!
Level: Beginner
Speaker: Rohan Deshpande - Sr. Software Dev Engineer, AWS Mobile Applications
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 Slid shows the GraphQL Fundamentals, cover below points.
* what: what is GraphQL
* who: Who builds GraphQL
* why: Why we need GraphQL
* how: How to use GraphQL
IT also cover
* Application Programming Interface (API History Image )
* Principles of REST API Design
* REST Flow / GraphQL Flow diagram
* Rest Traditional Data fetching.
* REST vs GraphQL
* Browser Tools
* GraphQL Mutation
* GraphQL Variables
* GraphQL Fragments
* Pain Points of GraphQL
Max Panas (Web Developer @Agile Actors) and Stelios Charbalis (Software Engineer @Agile Actors) present GraphQL and how it compares to traditional REST API design at GreeceJS Meetup #14 (Athens, June 15, 2016).
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)Hafiz Ismail
Talk for FOSSASIA 2016 (http://2016.fossasia.org)
----
This talk will give a brief and enlightening look into how GraphQL can help you address common weaknesses that you, as a web / mobile developer, would normally face with using / building typical REST API systems.
Let's stop fighting about whether we should implement the strictest interpretation of REST or how pragmatic REST-ful design is the only way to go, or debate about what REST is or what it should be.
A couple of demos (In Golang! Yay!) will be shown that are guaranteed to open up your eyes and see that the dawn of liberation for product developers is finally here.
Background: GraphQL is a data query language and runtime designed and used at Facebook to request and deliver data to mobile and web apps since 2012.
Hafiz Ismail (@sogko) is a contributor to Go / Golang implementation of GraphQL server library (https://github.com/graphql-go/graphql) and is looking to encourage fellow developers to join in the collaborative effort.
Discover how GraphQL can help you building and evolve your business APIs.
GraphQL is a query language for APIs developed internally by Facebook. It allows the developers to ask for exactly what they need and nothing more, making it easier to evolve APIs over time and create powerful developer tools around an API.
Presented by Helder Vasconcelos and Luis Gonçalves on 21st May 2019 @ Reactor Innovation Hub.
Powered by https://taikai.network
Creating a GraphQL API is more and more common for PHP developers. The task can seem complex but there are a lot of tools to help.
In this talk given at AFUP Paris PHP Meetup, I'm presenting GraphQL and why it is important. Then, I'm having a look at the existing libraries in PHP. Finally, I'm diving in the details of GraphQLite; a library that creates a GraphQL schema by analyzing your PHP code.
Managing data is difficult and sometimes handling JSON APIs can get confusing. Figuring out endpoints is stressful. GraphQL is here to change that. GraphQL is a query language that can be implemented in whichever programming language you want. Thanks to it, we can use a single endpoint to exchange data. Choose your data! No overfetching! In this workshop we will learn all about GraphQL by building an application from the server to the client using JavaScript.
Introduction to GraphQL Presentation.pptxKnoldus Inc.
GraphQL is an open-source data query and manipulation language for APIs and a query runtime engine. GraphQL enables declarative data fetching where a client can specify exactly what data it needs from an API
GraphQL is a syntax that describes how to ask for data, and is generally used to load data from a server to a client. GraphQL has three main characteristics:
It lets the client specify exactly what data it needs.
It makes it easier to aggregate data from multiple sources.
It uses a type system to describe data.
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.
GraphQL with .NET Core Microservices.pdfKnoldus Inc.
In this Webinar, will talk on GraphQL with .NET, that provides a modern and flexible approach to building APIs. It empowers developers to create efficient and tailored APIs that meet the specific needs of their applications and clients.
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)Rob Crowley
The shift to microservices, cloud native and rich web apps have made it challenging to deliver compelling API experiences. REST, as specified in Roy Fielding’s seminal dissertation, has become the architectural pattern of choice for APIs and when applied correctly allows for clients and servers to evolve in a loosely coupled manner. There are areas however where REST can deliver less than ideal client experiences. Often many HTTP requests are required to render a single view.
While this may be a minor concern for a web app running on a WAN with low latency and high bandwidth, it can yield poor client experiences for mobile clients in particular. GraphQL is Facebook’s response to this challenge and it is quickly proving itself as an exciting alternative to RESTful APIs for a wide range of contexts. GraphQL is a query language that provides a clean and simple syntax for consumers to interrogate your APIs. These queries are strongly types, hierarchical and enable clients to retrieve only the data they need.
In this session, we will take a hands-on look at GraphQL and see how it can be used to build APIs that are a joy to use.
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.
Build GraphQL APIs with Graphene (Big Mountain Data & Dev 2019)Ayla Khan
Learn about the GraphQL query language, how it compares to REST, and how to build GraphQL APIs in Python using the Graphene library and Flask. Code examples provided on GitHub.
GraphQL is an emerging API standard that provides a more flexible and alternative approach for data intensive operations. It is particularly good for querying and retrieving data in optimized forms that make applications more efficient and optimal. While GraphQL focuses on what it does best, we still need to ensure that our GraphQL services are exposed in a secure, controlled, monitored, and sometimes even in a monetized environment. This is where the inclusion of an API gateway that understands GraphQL queries, mutations, and subscriptions can add significant value.
This deck explores the following:
- Introduction to GraphQL
- Exposing GraphQL services as managed APIs
- Authentication
- Authorization
- Rate limiting
- Invoking GraphQL APIs exposed via WSO2 API Manager
Watch the webinar on-demand here - https://wso2.com/library/webinars/2019/11/exposing-graphqls-as-managed-apis/
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
UiPath Test Automation using UiPath Test Suite series, part 4
Introduction to GraphQL
1. A Query Language for your API
GraphQL
Bhargav Anadkat
Twitter @bhargavlalo
2. WHAT TO EXPECT AHEAD...
❏ Introduction
❏ Start with Example
❏ REST Limitations
❏ Why choose GraphQL over
REST?
❏ What is GraphQL?
❏ Who uses GraphQL?
❏ Language Supported
❏ Install & Configure in NodeJs
❏ Install & Configure in .Net/C#
❏ Install & Configure in PHP
❏ Understanding Tools
❏ Types & Schema
❏ Scalar Type
❏ Object Type
❏ Query Type
❏ Mutation Type
❏ Input Type
❏ Enum Type
❏ Syntax & Language
❏ Fields
❏ Arguments
❏ Aliases
❏ Fragments
❏ Resolver
❏ Introspection
❏ Live Example
❏ PHP Sample
❏ Shopify
❏ Movies
❏ Further reading
❏ Questions
3. Let’s start with an Example
You have an API for music albums and songs:
Album:
{
“id” : 321
“artist”: “David Bowie”,
“name”: “Aladdin Sane”,
“releaseYear”: 1973,
“songIDs”:
[111,112,113,114,....],
…
}
Song:
{
“id” : 116
“artist”: “David Bowie”,
“name”: “Time”,
“album” : “Aladdin Sane”,
“duration”: “5:15”,
“trackNumber”: 6,
...
}
And now you want to get all of an artist’s albums with their songs lists
4. GET /artist/1
GET /album/321
GET /song/111
GET /song/112
…
...
GET /song/120
GET /album/322
GET /song/211
GET /song/212
…
...
GET /song/220
...
❏ Requires many requests
❏ Each request returns much more data than you
need
❏ Other option - ad-hoc API for album with songs
❏ But adding API per need might end up with way
too many APIs
❏ And you’d still get more data than you need
5. REST Limitations
❏ Resource-centric: many endpoints
❏ The endpoints are often organized the way they’re
stored in DB, not the way they’re retrieved by clients
❏ Large and fixed responses
❏ Getting a complete response requires multiple requests
❏ We would like to get on a single request
❏ ALL the data that we need, from several resources
❏ ONLY the data that we need -no large responses
with redundant fields
6. Why choose GraphQL over REST?
❏ Single endpoint -easier to scale
❏ Tailored responses -client gets only what he wants
❏ Fewer round trips -can return several related resources
together
❏ Backwards compatibility -the client decides the
response structure, knows exactly what to expect
❏ Introspective -GraphQL has a native and highly
extensible schema and type system
7. GraphQL is a modern query language for the API.
It allows the front-end developer, to write queries that have the exact data shape they want.
GraphQL is developed by Facebook.
GraphQL was developed internally by Facebook in 2012
It's open source version publicly released in 2015 and current stable version released in
June 2018
GraphQL official website is https://graphql.org/
GraphQL official git repository is https://github.com/graphql/graphql-spec
What is GraphQL?
11. .Net/C# GraphQL nuGet library
❏ graphql-dotnet: GraphQL for .NET
❏ graphql-net: Convert GraphQL to IQueryable
❏ Hot Chocolate: GraphQL Server for .net core and .net classic
Install & Configure in .Net/C#
12. PHP Composer Library
❏ graphql-php: A PHP port of GraphQL reference implementation
❏ graphql-relay-php: A library to help construct a graphql-php server
supporting react-relay.
Install & Configure in PHP
14. Schema
A GraphQL schema is at the center of any
GraphQL server implementation and
describes the functionality available to the
clients which connect to it.
Type
GraphQL is a strongly typed language.
Type System defines various data types that
can be used in a GraphQL application.
The type system helps to define the
schema, which is a contract between client
and server.
Types & Schema
List of Types
❏ Scalar Type
❏ Object Type
❏ Query Type
❏ Mutation Type
❏ Interface Type
❏ Union Type
❏ Enum Type
❏ Input Type
15. Scalar types represent primitive leaf values in a GraphQL
type system.
GraphQL responses take the form of a hierarchical tree; the
leaves on these trees are GraphQL scalars.
Scalar Type
Custom Scalars
❏ EmailAddress
❏ USCurrency
❏ PhoneNumber
❏ URL
❏ DateTime
Built‐in Scalars
❏ Int
❏ Float
❏ String
❏ Boolean
❏ ID
Syntax
field: data_type
16. The object type is the most common type used
in a schema and represents a group of fields.
Each field inside an object type maps to another
type, thereby allowing nested types.
In other words, an object type is composed of
multiple scalar types or object types.
Object Type
Syntax
type object_type_name
{
field1: data_type
field2:data_type
....
fieldn:data_type
}
17. Entry point type to other specific types
A GraphQL query is used to read or fetch values.
It is not mandatory to pass “query” word in each
query
Query Type
Syntax 1
query query_name{
someField }
Syntax 2
{ someField }
18. Mutation is also an entry point type
It can be used to insert, update, or delete data.
Mutation also has a returned value, just like
query
Mutation Type
Syntax
mutation{
someEditOperation(dataField:"val
ueOfField"):returnType
}
19. In the GraphQL schema language, input types
look exactly the same as regular object types,
but with the keyword input instead of type:
Mostly it is used with mutation type for data
operation like add,edit and delete.
Input Type
Syntax
Input object_input_name
{
field1: data_type
field2:data_type
....
fieldn:data_type
}
20. Also called Enums, enumeration types are a
special kind of scalar that is restricted to a
particular set of allowed values.
It is used for fix data. For e.g weekdays, months,
and measurements Units.
Enum Type
Syntax
Enum object_enum_name
{
Data
Data
....
Data
}
22. At its simplest, GraphQL is about asking for specific fields on objects.
Fields
23. GraphQL Argument is very useful for data fetching.
We can define any number of arguments.
It helps to get specific data fetching like
Page limit, filter option.
Arguments
25. Fragments are aliases for a
bundle of fields.
Fields in fragments are added
at the same level of invocation
as adjacent fields.
Syntax-prefixed with ...
Fragments
26. Each object in the schema should be provided with a resolver.
The resolver is a piece of code that does the actual work -fetches the
results from the storage layer.
GraphQL server will take care of combining the objects and returning
only the selection set fields.
Resolver
27. GraphQL APIs are required to be self-documenting.
According to the specification, every GraphQL API needs to respond to queries about its own
structure.
This system is called introspection, and an introspection query starts with the __schema field
present on every GraphQL API that hasn’t intentionally disabled it.
Introspection
28. ❏ PHP Sample Example
❏ Shopify
❏ Movies
Live Example
29. Further Reading
❏ https://github.com/chentsulin/awesome-graphql github repo
with many links to tutorials, libraries in various languages,
blogs, videos and more
❏ http://graphql.org/learn
❏ https://www.graphqlhub.com - playground on various public
GraphQL API. good place to learn the syntax
❏ https://www.howtographql.com/ - How to GraphQL