Relay2 is almost here and it looks awesome – Quri Engineering – Medium

Relay2 is almost here and it looks awesome:  #ReactJS #JavaScript

  • That said, the main drawbacks against Relay have been:The lack of community engagement: Relay is a Facebook-driven project; Facebook’s priorities might not be the ones of the greater GraphQL community.The mutations API can be hard to understand: you need to spend time in the documentation and actually using it to understand what a RANGE_ADD actually does.
  • That codebase was unapproachable to the average developer.Other random confusing parts: Query Routes aren’t actually routes as most React developer would think, mutation can only take a single input: argument, root connections are not a thing unless using the viewer trick.I have personally been on the watch for the most recent updates since my interest got piqued at the Silicon Valley ReactJS Meetup where a technical overview was first presented and then a few weeks later when the same Greg Hurell gave a Deep Dive on the internals.Since then the FB team would often talk about the future of Relay —and the community picked up concepts: subscriptions, persisted queries — however never a release date was announced.
  • Examples of common types of artifacts include optimized GraphQL to persist to your server, runtime representations of the queries for use with GraphQL clients such as the Relay runtime, or generated source code for use with GraphQL frameworks for compiled languages (Java/Swift/etc).
  • TLDR; relay-compiler parses your code, reads the GraphQL queries or fragments and spits out GraphQL documents, persisted queries, other language generated code (like Swift types or Flow definitions)Relay Runtime: The Relay runtime is a full-featured GraphQL client that is designed for high performance even on low-end mobile devices and is capable of scaling to large, complex apps.
  • It has 3 sub-folders: classic contains the current implementation, compact will provide a compatibility API that will allow users of Relay to incrementally transition their implementations and finally modern which contains the new bindings.For more information about Relay Modern, check out the [meta] GitHub issue.If you are eager to work with an awesome team on projects that use GraphQL, cutting-edge front-end tech, reach out we are hiring!

At Quri we have been users of GraphQL in production for more than a year now. We started by just replacing our Redux / REST “api calls” with some manually constructed GraphQL queries, soon enough we…
Continue reading “Relay2 is almost here and it looks awesome – Quri Engineering – Medium”

Apollo on React Native Radio – Apollo GraphQL

  • For example, Apollo Client is a caching JavaScript client for GraphQL. React Apollo is a really popular way to use GraphQL data in your React application.
  • It’s really natural to use your Redux data as input into your query results.
  • It also works with some of these other libraries that help manage Redux data.
  • It’s actually designed especially for people who like the insight into their app data that Redux gives you, and people that are already using Redux in their app.
  • I guess before we get too deep into some of this technical stuff, for people that are listening that maybe haven’t used Apollo.

Tom Coleman and I went on the December 5 episode of React Native Radio, and we got asked some really great questions. You can listen to the episode on, but if you don’t want to take an…
Continue reading “Apollo on React Native Radio – Apollo GraphQL”

How to write amazing React Native applications with Apollo-react.

  • Now I would like to tell you a bit more about the data prop that is attached to our component after calling a query.
  • The way we can attach data to any container or component we like.
  • You already know the .mutate() function attached to our component – we can use it the way we’ve seen above, but we might have a problem with attaching multiple mutations to one component.
  • In the next steps I’ll show you how to attach data from server to our components.
  • Apollo React – Queries and Mutations

When about to start writing a new React Native application, one of the first things I ask myself is “How to handle the logic within the application, and what tools should I use to communicate with…
Continue reading “How to write amazing React Native applications with Apollo-react.”

Learn Relay

Learn Relay! #relayjs #reactjs

  • Relay will aggregate the defined queries with fragments by using Relay.
  • All mutations have to be dispatched using the Relay.
  • As Relay is a GraphQL client, this introduction focuses on the client side.
  • Mutations are the counterpart to queries, as they are used to modify or delete data.
  • Queries are a central part of Relay as they are used to fetch data from the GraphQL server.

Get a broad overview of the goals and prerequisites of this introduction to Relay and get to know the Pokedex app we will build together.
Continue reading “Learn Relay”

The new GitHub GraphQL API – Building Apollo – Medium

  • If you sign their prerelease agreement, you get early access to the GitHub GraphQL API.
  • Where REST requires many requests, GraphQL takes just one
  • If you don’t know what GraphQL is, go check out the excellent introduction on before reading the rest of this post.
  • I could have used GraphiQL to explore the schema, but it’s not the easiest way to get a quick overview, so I turned to the API documentation to find out what queries or mutations I could make.
  • My first comment made via GitHub’s GraphQL API

What every developer needs to know about GitHub’s new API
Continue reading “The new GitHub GraphQL API – Building Apollo – Medium”

REST API downfalls, and dawn of GraphQL — Medium

REST API downfalls, and dawn of #GraphQL:  #ReactJS

  • You also have to refactor your client to make this API call at the top level and pass the data down to the respective UI components.
  • Unlike with discrete REST endpoints, all the data for any given UI (page) can be sent in one trip to the client.
  • REST grew up in an age where the server dominated the web application landscape.
  • So the easiest thing is to do create new endpoints and leave the old ones untouched.
  • To get started you need a GraphQL server and and GraphQL client.

Read the full article, click here.

@ReactiveConf: “REST API downfalls, and dawn of #GraphQL: #ReactJS”

And getting started with GraphQL today

REST API downfalls, and dawn of GraphQL — Medium