Showing posts with label graphql. Show all posts
Showing posts with label graphql. Show all posts

Saturday, February 16, 2019

Type-Safe & Composable GraphQL in Elm

Type-Safe & Composable GraphQL in Elm

Elm is the ideal language for building GraphQL requests. Because it is type-safe and has an expressive type system, you can take full advantage of having a typed API (i.e. your GraphQL Schema).

Wednesday, January 2, 2019

graphql-cli/graphql-cli

graphql-cli/graphql-cli

Note: The graphql-cli has a different use case than the Graphcool CLI. Graphcool CLI is specific to the Graphcool Framework, while graphql-cli can be used with any GraphQL project. You can simply install the CLI using npm or yarn by running the following command.

GraphQL Yoga · Prisma OSS

GraphQL Yoga ยท Prisma OSS



Wednesday, February 28, 2018

Quickstart · GitBook



This page will give you a short introduction to the concepts in Juniper. Once you are done here, head over to the Tutorial to learn how to use Juniper by creating a full setup step by step, or consult the other chapters for more detailed information.

Tuesday, February 6, 2018

Interview with Robert Mosolgo – Creator of graphql-ruby



Recently, I got the opportunity to sit down with Robert Mosolgo and interview him. For those of you that don’t know, Robert is the creator of the graphql-ruby gem, and he also works at GitHub on the team that works on their GraphQL API (among several other things).

Friday, June 23, 2017

Getting started with Redux and GraphQL



When GraphQL was announced it was clear to everyone that it was going to be awesome. The community waited patiently to sink their teeth into it and finally the technical preview was released in all its glory.

Thursday, June 22, 2017

Real Time GraphQL — Chat (Part 1 Server)



This question really boils down to your data-access patterns in product. If most of your specifications are static lists or content, then having a simple request and response transport coupled with a caching client can serve most of your needs.

Thursday, June 8, 2017

Building HandsUp: an OS real-time Q&A App using GraphQL and React



In this article, we will look at all the steps that were involved to build an Open Source real-time Q&A App using GraphQL and React. This App will allow attendees of an event to ask questions (if logged in) and vote for the most interesting ones.

Tuesday, June 6, 2017

rmosolgo/graphql-streaming



Experimental tools for GraphQL over a long-lived connection, including subscription, @defer and @stream. (demo) This gem supports queries with @defer and @stream.

Thursday, June 1, 2017

Exploring Relay Modern



GraphQL is an incredible API technology that lets consumers describe their data requirements with a simple, declarative query language. Even though GraphQL servers are easy to query via a simple HTTP request, GraphQL’s well-specified nature enables us to go beyond just making basic requests.

GraphQL and Relay on Rails — dynamic component rendering — Medium



In our previous posts, we looked into basics of GraphQL and Relay and how to integrate it with Rails. We have also built our first react component using Relay to fetch posts on homepage using GraphQL.

GraphQL and Relay on Rails — First relay powered react component



In our previous post, we looked into GraphQL schema and types. We also looked into how to query the Schema to fetch necessary data we need from rails console.

Relay/GraphQL On Rails



Summary: If you are excited about just declaring data required by your UI components while leaving the difficult parts of data fetching, updating, and data handling performance issues to a framework, you will be excited by Facebook’s recent release of Relay/RelayJS (Sep 2015), which works with Rea

Saturday, May 27, 2017

GraphQL and Relay on Rails — Authentication and Mutations



So far, we have covered basics of relay and GraphQL, building GraphQL server on top of Rails, data fetching for react components and dynamic client-side react component rendering with Relay. In this post, we are going to cover a important requirement of any web application i.e. user authentication.

Sunday, May 21, 2017

How to use Relay GraphQL node identification with clean URL REST resources id

Relay uses node identification to cache parts of graphql query, but in order to do that we need to use type connections and node IDs.


In React Web App, the user may browse a list of posts and click to show post detail. Or, the user may access a post directly from the url.


In the first scenario, relay fetch a list of posts assign an ID for each node, and when the user click on the show post link, the link should send the node ID for Relay uses it and either 1) retreive the node from the cache or 2) retreive the node from the graphql server using the node interface like on the graphql query above.


In the second scenario the page will be universally rendered by the server and Relay wouldn't have the change to fetch this specific node and hence I wouldn't know the node ID and then I have to fetch the node by any unique attribute like database ID, title or slug.


So the aim of this post is to show how to handle both scenarios in the React App.

The idea is to use the element of react-router to send both the URL ID and the Node ID (if exists) to the Router.



We will create two QueryRenderer component one for each scenario.

And based on the existence of location.state.post_id we can choose which QueryRenderer to use.
In Relay Classic we could get away with one QueryRoute and change the root query based on the presence of Node ID. but in Relay Modern the graphql get precompiled and the root query have a strict naming convention based on the component name so I didn't find another solution except creating two QueryRenderer components.

Wednesday, May 17, 2017

How to generate schema.graphql from introspection Query

To generate a graphql schema from a running Graphql server. The following script use buildClientSchema, printSchema and introspectionQuery from "graphql" module to introspect, build and print the schema to graphql format.

In my case I was running a graphql-ruby server in a Rails application, but it doesn't matter what server is running.

Then run the script and if the graphql server is running and properly configured you should find two schema files one in JSON and the other in graphql format.

$ node generate_schema.js 

Wednesday, April 26, 2017

Reconciling Relay With Your Redux App



It’s not news how popular React has become over the past few years. Many developers have praised such benefits as the speed that comes from the virtual DOM, the ease of developing an app as a set of reusable components and one-way data flow.

Saturday, April 22, 2017

GraphQL bindings for Neo4j, generates and runs Cypher



This implementation provides a GraphQL API to Neo4j, it comes as library but can also be installed as Neo4j server extension to act as a GraphQL endpoint.

from Pocket http://ift.tt/2fjB96M
via IFTTT

bundlephobia

JavaScript bloat is a more real problem today than it ever was. Bundlephobia lets you understand the performance cost of adding a npm pack...