RapidAPI Profile picture
Feb 2 โ€ข 18 tweets โ€ข 3 min read
What exactly is GraphQL.

Thread ๐Ÿงต๐Ÿ‘‡๐Ÿป
GraphQL is a query language that lets your client request the server to send only the required data.
GraphQL was created by developers at Facebook in 2012.

GraphQL was developed to support the complicated data structures required to show the Facebook News Feed on the mobile application.
Using GraphQL, the client can request the necessary data using a single endpoint with a defined schema.
Considering you're building a blogging platform, you will need to fetch posts, author, published date, comments, and other associated data with a particular post.
With a standard REST API, you can design such an API very easily.

But now consider that you want to display comments only on the web app, not the mobile app.

It's almost impossible to achieve this with a single REST API.
This is where GraphQL can help you.

The client can ask for the data they need, and the server will return with only that data.
GraphQL relies on a strongly typed schema.

This means that the schema acts as a contract between the client and the server.

The predefined schema allows the client to specify the exact shape of thereturned datad.
This Schema is known as Schema Definition Language.

Schema Definition Language is nothing but the syntax of writing schemas in GraphQL query language, and it's pretty intuitive.
Consider the `User` schema below written in Schema Definition Language: ๐Ÿ‘‡๐Ÿป

The `User` type has two fields, `name` and `email` with type String. type User {	   name: String!   email: String! }
The exclamation mark (!) at the end depicts that the fields are required.
Moving forward, Schema Definition Language allows you to establish relationships between types.

For example, a `Blog` is associated with a particular `User`. type User {	   name: String!	   email: String!:   blogs: [Bl
There are two GraphQL operations - Queries and Mutations using which you can fetch data and save data to the GraphQL server.
โ—พ Queries

When requesting data from a GraphQL server, the client has to send some information to the server.

Based on this information, the server will send the response. This information is known as a query. { 	user(id: 1) { 		name 		email 	} }
โ—พ Mutations

You can use a "mutation" when you want to save data to a GraphQL server.

You can create, update, and delete data from a GraphQL server using mutations. { 	createUser( 		name: "John Doe", 		email: "
The ability of GraphQL to define the exact request and response structure helps us cut down on the resources and bandwidth required to fetch data.
With that being said, this is the end of this thread. We hope you found this thread helpful.๐Ÿ’™

Head over to RapidAPI Hub(RapidAPI.com/hub?utm_sourceโ€ฆ) and get access to excellent GraphQL APIs.
Visit RapidAPI Learn (RapidAPI.com/learn/graphql-โ€ฆ) and play around with interactive components.

โ€ข โ€ข โ€ข

Missing some Tweet in this thread? You can try to force a refresh
ใ€€

Keep Current with RapidAPI

RapidAPI Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Rapid_API

Feb 3
Let's break down the process of building a GraphQL server from scratch.

Thread ๐Ÿงต๐Ÿ‘‡๐Ÿป
Let's start with the theoretical discussion.

Quickly take a look at this thread to get started with GraphQL. ๐Ÿ‘‡๐Ÿป

We are assuming you have Node.js installed on your machine. If you haven't installed it, click on the following link and install it simply.

nodejs.org/en/
Read 20 tweets
Feb 3
What exactly is the HTTP-based system.

Thread ๐Ÿงต๐Ÿ‘‡๐Ÿป
HTTP is a communication protocol that establishes the connection between web browsers and web servers.
HTTP is entirely based on the client-server model, where the client initiates the request then waits until it receives a response from the server.
Read 19 tweets
Feb 1
What exactly is an API?

Thread ๐Ÿงต๐Ÿ‘‡๐Ÿป
API is the acronym for Application Programming Interface.

In simple terms, API is an interface that lets your application talk to another application.
API is a set of definitions and protocols that allow technology products and services to communicate.

This may not sound very clear. Let's break it down.
Read 15 tweets
Jan 31
How to make your API secure.

Thread ๐Ÿงต๐Ÿ‘‡๐Ÿป
Building an API is one thing, and securing it is another.

If your API is vulnerable, the user's sensitive information will be at risk.

Hence, it's crucial to deliver a secure API.
If your API is not secure, the attackers can quickly access your network by exploiting vulnerabilities in your APIs.

Before deep-diving into making your API secure, let's first discuss what are some common attacks. ๐Ÿ‘‡๐Ÿป
Read 14 tweets
Jan 31
Top 10 Artificial Intelligence APIs.

Thread ๐Ÿงต๐Ÿ‘‡๐Ÿป
1๏ธโƒฃ Extract Table - DocumentDev

- Extract information from PDF Tables instantly. Using the power of Artificial Intelligence and NLP.

RapidAPI.com/documentdev/apโ€ฆ
2๏ธโƒฃ Sentiments

- Sentiments API returns the sentiment score of any given text.

RapidAPI.com/connexun-srl-cโ€ฆ
Read 12 tweets
Jan 27
API development becomes a little easier if you know the correct terms and their correct meaning.

Here, we complied with widely used terms in API development.

Thread ๐Ÿงต
๐Ÿ“Œ API Key

An API key is a unique code that lets you call an API.

The only rule is that these keys must be unique and not easy to guess.

Generally, API keys contain lower case and upper case letters with numbers.
๐Ÿ“Œ API Token

The API token is a unique identifier of an application requesting access to your API.

An API token is a form of authentication similar to a username/password.
Read 17 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

:(