Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Facebook's Graph API using GraphQL?

Tags:

graphql

They said Facebook used GraphQL since 2012. Is Facebook's Graph API using GraphQL? If not, is there any public Facebook's API using GraphQL?

Do we need versioning for our APIs if we use GraphQL server?

like image 974
Xaree Lee Avatar asked Mar 12 '17 16:03

Xaree Lee


People also ask

Does Facebook graph API use GraphQL?

Their GraphQL API powers data to all facebook apps today (android, iOS, etc), and I don't think facebook have any plans of making that specific API public. They might make their Graph API available in GraphQL at some point. About versioning: If you add features to your API you don't need to version it.

Is graph API same as GraphQL?

CosmosDB Graph API is a query language to manage and query "CosmosDB graph database". Graph database unlike traditional databases, store information in the form of a graph (i.e., vertices and edges). GraphQL on the other hand is a query language for a user API.

What API does Facebook use?

The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.

Is Facebook graph API a REST API?

Yes, it is a REST API as well. Show activity on this post. Yes, there have been 3 Facebook API's to date: Legacy REST.


1 Answers

Daniel Schafer from Facebook mentioned at the GraphQL Europe conference that Facebook's GraphQL API is not available to the public. (Not to be confused with their graph API).

Their GraphQL API powers data to all facebook apps today (android, iOS, etc), and I don't think facebook have any plans of making that specific API public.

They might make their Graph API available in GraphQL at some point.

However if you want to play with a public GraphQL API, you can find some here: https://github.com/APIs-guru/graphql-apis/blob/master/README.md

Furthermore if you want to "fiddle" with setting up a GraphQL API you can try out Launchpad by Apollo: https://launchpad.graphql.com

About versioning: If you add features to your API you don't need to version it. However if you change some data output drastically, like eliminating fields, and you have clients depend on this, you would probably need to version your GraphQL API. Try to avoid this pattern.

Think of GraphQL as a client-driven development tool. If you have active clients using fields, don't remove them from API until all clients has been updated to use some other fields. Read more on versioning REST vs GraphQL here: https://www.symfony.fi/entry/versioning-an-api-in-graphql-vs-rest

like image 91
Lars Emil Christensen Avatar answered Sep 19 '22 18:09

Lars Emil Christensen