Skip to content

Commit

Permalink
Auto-deploy by Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis CI committed Oct 15, 2020
0 parents commit 0e7ff4e
Show file tree
Hide file tree
Showing 206 changed files with 360,763 additions and 0 deletions.
1 change: 1 addition & 0 deletions .nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO: get this out of the source
25 changes: 25 additions & 0 deletions _redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 200 = reverse proxy rules
# https://www.netlify.com/docs/redirects/#rewrites-and-proxying

/swapi-graphql https://graphql.github.io/swapi-graphql/ 200
/swapi-graphql/* https://graphql.github.io/swapi-graphql/:splat 200

# 301 = permanent redirects
# https://www.netlify.com/docs/redirects/#http-status-codes

/docs/api-reference-errors /graphql-js/error/ 301
/docs/api-reference-execution /graphql-js/execution/ 301
/docs/api-reference-express-graphql /graphql-js/express-graphql/ 301
/docs/api-reference-graphql /graphql-js/graphql/ 301
/docs/api-reference-language /graphql-js/language/ 301
/docs/api-reference-type-system /graphql-js/type/ 301
/docs/api-reference-type-utilities /graphql-js/utilities/ 301
/docs/api-reference-type-validation /graphql-js/validation/ 301
/docs/getting-started /learn/ 301
/docs/intro /learn/ 301
/docs/introspection /learn/introspection/ 301
/docs/queries /learn/queries/ 301
/docs/typesystem /learn/schema/ 301
/docs/validation /learn/validation/ 301
/docs/videos /community/#videos 301
/help /community/ 301
22 changes: 22 additions & 0 deletions blog/graphql-a-query-language/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/><title>GraphQL: A data query language | GraphQL</title><meta name="viewport" content="width=640"/><meta name="description" content="GraphQL provides a complete 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."/><meta property="og:title" content="GraphQL: A query language for APIs."/><meta property="og:description" content="GraphQL provides a complete 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."/><meta property="og:type" content="website"/><meta property="og:url" content="http://graphql.org/"/><meta property="og:image" content="/img/og_image.png"/><meta property="og:image:type" content="image/png"/><meta name="twitter:card" content="summary"/><meta name="twitter:site" content="@graphql"/><meta name="twitter:title" content="GraphQL: A query language for APIs."/><meta name="twitter:description" content="GraphQL gives clients the power to ask for exactly what they need and nothing more, making it easier to evolve APIs over time."/><meta name="twitter:image" content="/img/twitter_image.png"/><link rel="shortcut icon" href="/img/favicon.png"/><link rel="home" type="application/rss+xml" href="/blog/rss.xml" title="GraphQL Team Blog"/><link rel="stylesheet" href="/style.css"/><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Rubik:300|Roboto:300"/><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,400i,600"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/></head><body><header><section><a class="nav-home" href="/"><img class="nav-logo" src="/img/logo.svg" alt="GraphQL Logo" width="30" height="30"/>GraphQL</a><nav><a href="/learn/">Learn</a><a href="/code/">Code</a><a href="/community/">Community</a><a href="https://graphql.github.io/graphql-spec/" target="_blank" rel="noopener noreferrer">Spec</a><a href="/codeofconduct/">Code of Conduct</a><a href="https://foundation.graphql.org/" target="_blank" rel="noopener noreferrer">Foundation</a><a href="https://l.graphql.org/" target="_blank" rel="noopener noreferrer">Landscape</a></nav><div class="algolia-search-wrapper"><input type="text" id="algolia-search-input" placeholder="Search docs..." aria-label="Search docs"/></div></section></header><section><div class="documentationContent"><div class="inner-content"><h1>GraphQL: A data query language</h1><p>9/14/2015 by Lee Byron</p><hr/><div><div>

</div><p>When we built Facebook&#x27;s mobile applications, we needed a data-fetching API powerful enough to describe all of Facebook, yet simple and easy to learn so product developers can focus on building things quickly. We developed GraphQL three years ago to fill this need. Today it powers hundreds of billions of API calls a day. This year we&#x27;ve begun the process of open-sourcing GraphQL by drafting a specification, releasing a reference implementation, and forming a community around it here at <a href="http://graphql.org/" target="_blank" rel="nofollow noopener noreferrer">graphql.org</a>.</p><h2><a class="anchor" name="why-graphql"></a>Why GraphQL? <a class="hash-link" href="#why-graphql">#</a></h2><p>Back in 2012, we began an effort to rebuild Facebook&#x27;s native mobile applications.</p><p>At the time, our iOS and Android apps were thin wrappers around views of our mobile website. While this brought us close to a platonic ideal of the &quot;write one, run anywhere&quot; mobile application, in practice it pushed our mobile-webview apps beyond their limits. As Facebook&#x27;s mobile apps became more complex, they suffered poor performance and frequently crashed.</p><p>As we transitioned to natively implemented models and views, we found ourselves for the first time needing an API data version of News Feed — which up until that point had only been delivered as HTML. We evaluated our options for delivering News Feed data to our mobile apps, including RESTful server resources and FQL tables (Facebook&#x27;s SQL-like API). We were frustrated with the differences between the data we wanted to use in our apps and the server queries they required. We don&#x27;t think of data in terms of resource URLs, secondary keys, or join tables; we think about it in terms of a graph of objects and the models we ultimately use in our apps like NSObjects or JSON.</p><p>There was also a considerable amount of code to write on both the server to prepare the data and on the client to parse it. This frustration inspired a few of us to start the project that ultimately became GraphQL. GraphQL was our opportunity to rethink mobile app data-fetching from the perspective of product designers and developers. It moved the focus of development to the client apps, where designers and developers spend their time and attention.</p><h2><a class="anchor" name="what-is-graphql"></a>What is GraphQL? <a class="hash-link" href="#what-is-graphql">#</a></h2><p>A GraphQL query is a string that is sent to a server to be interpreted and fulfilled, which then returns JSON back to the client.</p><div><div id="r101"><div class="miniGraphiQL" data-reactroot="" data-reactid="1" data-react-checksum="-1260504911"><div class="query-editor" data-reactid="2"></div><div class="result-window" data-reactid="3"></div></div></div>

</div><p><strong>Defines a data shape:</strong> The first thing you&#x27;ll notice is that GraphQL queries mirror their response. This makes it easy to predict the shape of the data returned from a query, as well as to write a query if you know the data your app needs. More important, this makes GraphQL really easy to learn and use. GraphQL is unapologetically driven by the data requirements of products and of the designers and developers who build them.</p><p><strong>Hierarchical:</strong> Another important aspect of GraphQL is its hierarchical nature. GraphQL naturally follows relationships between objects, where a RESTful service may require multiple round-trips (resource-intensive on mobile networks) or a complex join statement in SQL. This data hierarchy pairs well with graph-structured data stores and ultimately with the hierarchical user interfaces it&#x27;s used within.</p><p><strong>Strongly typed:</strong> Each level of a GraphQL query corresponds to a particular type, and each type describes a set of available fields. Similar to SQL, this allows GraphQL to provide descriptive error messages before executing a query. It also plays well with the strongly typed native environments of Obj-C and Java.</p><p><strong>Protocol, not storage:</strong> Each GraphQL field on the server is backed by a function - code linking to your application layer. While we were building GraphQL to support News Feed, we already had a sophisticated feed ranking and storage model, along with existing databases and business logic. GraphQL had to leverage all this existing work to be useful, and so does not dictate or provide any backing storage. Instead, GraphQL takes advantage of your existing code by exposing your application layer, not your storage layer.</p><p><strong>Introspective:</strong> A GraphQL server can be queried for the types it supports. This creates a powerful platform for tools and client software to build atop this information like code generation in statically typed languages, our application framework, Relay, or IDEs like GraphiQL (pictured below). GraphiQL helps developers learn and explore an API quickly without grepping the codebase or wrangling with cURL.</p><div><div id="r102"><div class="miniGraphiQL" data-reactroot="" data-reactid="1" data-react-checksum="-1260504911"><div class="query-editor" data-reactid="2"></div><div class="result-window" data-reactid="3"></div></div></div>

</div><p><strong>Version free:</strong> The shape of the returned data is determined entirely by the client&#x27;s query, so servers become simpler and easy to generalize. When you&#x27;re adding new product features, additional fields can be added to the server, leaving existing clients unaffected. When you&#x27;re sunsetting older features, the corresponding server fields can be deprecated but continue to function. This gradual, backward-compatible process removes the need for an incrementing version number. We still support three years of released Facebook applications on a single version of our GraphQL API.</p><p>With GraphQL, we were able to build full-featured native News Feed on iOS in 2012, and on Android shortly after. Since then, GraphQL has become the primary way we build our mobile apps and the servers that power them. More than three years later, GraphQL powers almost all data-fetching in our mobile applications, serving millions of requests per second from nearly 1,000 shipped application versions.</p><p>When we built GraphQL in 2012 we had no idea how important it would become to how we build things at Facebook and didn&#x27;t anticipate its value beyond Facebook. However earlier this year we announced Relay, our application framework for the web and React Native built atop GraphQL. The community excitement for Relay inspired us to revisit GraphQL to evaluate every detail, make improvements, fix inconsistencies, and write a specification describing GraphQL and how it works.</p><p>Two months ago, we <a href="https://www.youtube.com/watch?v=WQLzZf34FJ8" target="_blank" rel="nofollow noopener noreferrer">made our progress public</a> and released a working draft of the <a href="http://facebook.github.io/graphql/" target="_blank" rel="nofollow noopener noreferrer">GraphQL spec</a> and a reference implementation: <a href="https://github.com/graphql/graphql-js" target="_blank" rel="nofollow noopener noreferrer">GraphQL.js</a>. Since then, a community has started to form around GraphQL, and versions of the GraphQL runtime are being <a href="https://github.com/chentsulin/awesome-graphql" target="_blank" rel="nofollow noopener noreferrer">built in many languages</a>, including Go, Ruby, Scala, Java, .Net, and Python. We&#x27;ve also begun to share some of the tools we use internally, like <a href="https://github.com/graphql/graphiql" target="_blank" rel="nofollow noopener noreferrer">GraphiQL</a>, an in-browser IDE, documentation browser, and query runner. GraphQL has also seen production usage outside Facebook, in a project for the <a href="https://www.youtube.com/watch?v=S0s935RKKB4" target="_blank" rel="nofollow noopener noreferrer"><em>Financial Times</em></a> by consultancy <a href="http://red-badger.com/" target="_blank" rel="nofollow noopener noreferrer">Red Badger</a>.</p><p>“GraphQL makes orchestrating data fetching so much simpler and it pretty much functions as a perfect isolation point between the front end and the back end”
— Viktor Charypar, software engineer at Red Badger</p><p>While GraphQL is an established part of building products at Facebook, its use beyond Facebook is just beginning. Try out <a href="http://graphql-swapi.parseapp.com/graphiql/" target="_blank" rel="nofollow noopener noreferrer">GraphiQL</a> and help provide feedback on our <a href="https://github.com/facebook/graphql/" target="_blank" rel="nofollow noopener noreferrer">specification</a>. We think GraphQL can greatly simplify data needs for both client product developers and server-side engineers, regardless of what languages you&#x27;re using in either environment, and we&#x27;re excited to continue to improve GraphQL, help a community grow around it, and see what we can build together.</p></div></div><div class="nav-docs"><div class="nav-docs-section"><h3>Subscribe</h3><a rel="home" type="application/rss+xml" href="/blog/rss.xml">RSS</a></div><div class="nav-docs-section"><h3>Recent Posts</h3><ul><li><a href="/blog/production-ready/">Leaving technical preview</a></li><li><a href="/blog/rest-api-graphql-wrapper/">Wrapping a REST API in GraphQL</a></li><li><a href="/blog/mocking-with-graphql/">Mocking your server is easy with GraphQL</a></li><li><a href="/blog/subscriptions-in-graphql-and-relay/">Subscriptions in GraphQL and Relay</a></li><li>GraphQL: A data query language</li></ul></div></div></div></section><footer><section class="sitemap"><a href="/" class="nav-home" aria-label="Homepage"></a><div><h5><a href="/learn/">Learn</a></h5><a href="/learn/">Introduction</a><a href="/learn/queries/">Query Language</a><a href="/learn/schema/">Type System</a><a href="/learn/execution/">Execution</a><a href="/learn/best-practices/">Best Practices</a></div><div><h5><a href="/code">Code</a></h5><a href="/code/#server-libraries">Servers</a><a href="/code/#graphql-clients">Clients</a><a href="/code/#tools">Tools</a></div><div><h5><a href="/community">Community</a></h5><a href="/community/upcoming-events/">Upcoming Events</a><a href="http://stackoverflow.com/questions/tagged/graphql" target="_blank" rel="noopener noreferrer">Stack Overflow</a><a href="https://www.facebook.com/groups/graphql.community/" target="_blank" rel="noopener noreferrer">Facebook Group</a><a href="https://twitter.com/GraphQL" target="_blank" rel="noopener noreferrer">Twitter</a></div><div><h5>More</h5><a href="https://graphql.github.io/graphql-spec/" target="_blank" rel="noopener noreferrer">GraphQL Specification</a><a href="https://foundation.graphql.org/" target="_blank" rel="noopener noreferrer">GraphQL Foundation</a><a href="https://github.com/graphql" target="_blank" rel="noopener noreferrer">GraphQL GitHub</a><a href="https://github.com/graphql/graphql.github.io/edit/source/site/blog/20150914-graphql.md" target="_blank" rel="noopener noreferrer">Edit this page ✎</a></div></section><section class="copyright">Copyright © 2020 The GraphQL Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our <a href="https://www.linuxfoundation.org/trademark-usage">Trademark Usage</a> page. Linux is a registered trademark of Linus Torvalds. <a href="http://www.linuxfoundation.org/privacy">Privacy Policy</a> and <a href="http://www.linuxfoundation.org/terms">Terms of Use</a>.</section></footer><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>
docsearch({
apiKey: 'd103541f3e6041148aade2e746ed4d61',
indexName: 'graphql',
inputSelector: '#algolia-search-input'
});
</script><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-44373548-16', 'auto');
ga('send', 'pageview');
</script><script src="/vendor/react-15.0.1.min.js"></script><script src="/vendor/react-dom-15.0.1.min.js"></script><script src="index.html.18c36c39508f56c97e79.js"></script></body></html>
Loading

0 comments on commit 0e7ff4e

Please sign in to comment.