KEMBAR78
Testing and Developing GraphQL APIs | PDF
Attendees are muted
Ask questions under Q&A
A recording of this session will be shared
Feedback survey
Read and agree with the Postman Code of Conduct
postman.com/legal/community-code-of-conduct
1
2
3
4
5
Housekeeping
@getpostman
All rights reserved by Postman Inc
Testing and
Developing
GraphQL APIs
@Gbahdeyboh
DEVELOPER RELATIONS ENGINEER
Gbadebo
Bello
DEVELOPER ADVOCATE
POSTMAN
Pooja
Mistry
@poojamakes
@Gbahdeyboh
@getpostman
A little bit about You
GraphQL Overview
Resources
Q&A
1
2
3
4
Agenda
@getpostman
A little about you
● How much experience do you have
with Postman?
○ Less than 6 months
○ 6 months to 1 year
○ 1 year to 3 years
○ More than 3 years
● Do you consider yourself…
○ An API Producer
○ An API Consumer
○ Both
@getpostman
The GraphQL Story
iOS Native App 5.0 Release
Facebook published iOS 5.0, that included
GraphQL as the News Feed API. The project
was led by Dan Schafer, Lee Byron, Nick
Schrock and the iOS team to improve the
mobile user experience.
2012
GraphQL Specification Public
Release
Facebook published the GraphQL specification
document under copyright.
2015
GraphQL Foundation
The primary mission of the GraphQL Foundation
is to ensure that the GraphQL community is able
to focus on the continued evolution of the
specification and reference implementations.
2019
Public GraphQL API
GitHub v4 API was made available through
GraphQL. This was the first public GraphQL
API.
2016
@getpostman
Intro to GraphQL
● Flexible Data Retrieval: GraphQL is
a query language for APIs that
empowers clients to precisely request
the data they need, reducing
over-fetching and under-fetching
issues.
● Single Endpoint: Unlike traditional
APIs, GraphQL employs a single
endpoint for all queries, streamlining
interactions and simplifying the
architecture.
● Efficient Development: GraphQL
enables frontend and backend teams
to collaborate more effectively by
allowing them to iterate independently
and make changes without impacting
each other's work.
@getpostman
GraphQL Operations
● Queries: GraphQL queries allow
clients to request specific data from
the server in a single efficient request.
● Mutations: Mutations in GraphQL
enable clients to modify or create data
on the server in a controlled and
predictable manner.
● Subscriptions: GraphQL
subscriptions provide real-time
updates to clients by allowing them to
subscribe to changes or events on the
server.
@getpostman
GraphQL VS. REST
GraphQL REST
1. Single Endpoint: GraphQL APIs have a single
endpoint, simplifying API interactions.
2. Flexible Queries: Clients can request exactly the
data they need using a single query.
3. No Over/Under-Fetching: GraphQL responses
match query structures, avoiding unnecessary
data transfer.
4. Versioning Handling: No need for separate
endpoints; clients can adapt queries to deprecated
fields.
5. Complex Relationships: Easily fetch related data
with nested queries, reducing multiple round-trips.
1. Multiple Endpoints: REST APIs often have
multiple endpoints for different resources.
2. Fixed Responses: Servers provide predefined
data structures, leading to potential
over/under-fetching.
3. Caching Challenges: Data variability in endpoints
can complicate caching strategies.
4. Versioning Complexity: Requires separate
versioning strategies, creating compatibility
challenges.
5. Simplicity for Simplicity's Sake: Suitable for
straightforward use cases without complex data
requirements.
Let’s get started
tinyurl.com/graphQL-postman-echo
@getpostman
@getpostman
blog.postman.com/postman-joins-graphql-foundation/
Postman Answers
postman.com/postman/workspace/postman-answers/
Postman Quickstarts
quickstarts.postman.com
Postman Intergalactic
postman.com/events/intergalactic/
Community Forum
community.postman.com
@getpostman
Additional Resources
Q&A
@getpostman
Please tell us about your
experience!
FEEDBACK SURVEY
tinyurl.com/postman-graphQL-intergalactic
Thank You
@getpostman

Testing and Developing GraphQL APIs

  • 1.
    Attendees are muted Askquestions under Q&A A recording of this session will be shared Feedback survey Read and agree with the Postman Code of Conduct postman.com/legal/community-code-of-conduct 1 2 3 4 5 Housekeeping @getpostman
  • 2.
    All rights reservedby Postman Inc Testing and Developing GraphQL APIs
  • 3.
    @Gbahdeyboh DEVELOPER RELATIONS ENGINEER Gbadebo Bello DEVELOPERADVOCATE POSTMAN Pooja Mistry @poojamakes @Gbahdeyboh
  • 4.
    @getpostman A little bitabout You GraphQL Overview Resources Q&A 1 2 3 4 Agenda
  • 5.
    @getpostman A little aboutyou ● How much experience do you have with Postman? ○ Less than 6 months ○ 6 months to 1 year ○ 1 year to 3 years ○ More than 3 years ● Do you consider yourself… ○ An API Producer ○ An API Consumer ○ Both
  • 6.
    @getpostman The GraphQL Story iOSNative App 5.0 Release Facebook published iOS 5.0, that included GraphQL as the News Feed API. The project was led by Dan Schafer, Lee Byron, Nick Schrock and the iOS team to improve the mobile user experience. 2012 GraphQL Specification Public Release Facebook published the GraphQL specification document under copyright. 2015 GraphQL Foundation The primary mission of the GraphQL Foundation is to ensure that the GraphQL community is able to focus on the continued evolution of the specification and reference implementations. 2019 Public GraphQL API GitHub v4 API was made available through GraphQL. This was the first public GraphQL API. 2016
  • 7.
    @getpostman Intro to GraphQL ●Flexible Data Retrieval: GraphQL is a query language for APIs that empowers clients to precisely request the data they need, reducing over-fetching and under-fetching issues. ● Single Endpoint: Unlike traditional APIs, GraphQL employs a single endpoint for all queries, streamlining interactions and simplifying the architecture. ● Efficient Development: GraphQL enables frontend and backend teams to collaborate more effectively by allowing them to iterate independently and make changes without impacting each other's work.
  • 8.
    @getpostman GraphQL Operations ● Queries:GraphQL queries allow clients to request specific data from the server in a single efficient request. ● Mutations: Mutations in GraphQL enable clients to modify or create data on the server in a controlled and predictable manner. ● Subscriptions: GraphQL subscriptions provide real-time updates to clients by allowing them to subscribe to changes or events on the server.
  • 9.
    @getpostman GraphQL VS. REST GraphQLREST 1. Single Endpoint: GraphQL APIs have a single endpoint, simplifying API interactions. 2. Flexible Queries: Clients can request exactly the data they need using a single query. 3. No Over/Under-Fetching: GraphQL responses match query structures, avoiding unnecessary data transfer. 4. Versioning Handling: No need for separate endpoints; clients can adapt queries to deprecated fields. 5. Complex Relationships: Easily fetch related data with nested queries, reducing multiple round-trips. 1. Multiple Endpoints: REST APIs often have multiple endpoints for different resources. 2. Fixed Responses: Servers provide predefined data structures, leading to potential over/under-fetching. 3. Caching Challenges: Data variability in endpoints can complicate caching strategies. 4. Versioning Complexity: Requires separate versioning strategies, creating compatibility challenges. 5. Simplicity for Simplicity's Sake: Suitable for straightforward use cases without complex data requirements.
  • 10.
  • 11.
  • 12.
    Postman Answers postman.com/postman/workspace/postman-answers/ Postman Quickstarts quickstarts.postman.com PostmanIntergalactic postman.com/events/intergalactic/ Community Forum community.postman.com @getpostman Additional Resources
  • 13.
    Q&A @getpostman Please tell usabout your experience! FEEDBACK SURVEY tinyurl.com/postman-graphQL-intergalactic
  • 14.