All Projects → luiscript → facebook-arsenal

luiscript / facebook-arsenal

Licence: other
[Full stack] React Native + Relay modern template with Node + GraphQL backend

Programming Languages

javascript
184084 projects - #8 most used programming language
objective c
16641 projects - #2 most used programming language
python
139335 projects - #7 most used programming language
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to facebook-arsenal

react-relay-rebind
Component-scope state management for Relay modern & React.
Stars: ✭ 15 (-21.05%)
Mutual labels:  relay-modern
cirrus-ci-web
Web front end for Cirrus CI
Stars: ✭ 48 (+152.63%)
Mutual labels:  relay-modern
create-react-app-relay-modern
Create React App + Relay Modern
Stars: ✭ 50 (+163.16%)
Mutual labels:  relay-modern
klaravel
DEPRECATED Laravel control panel for developers, comes with integrated Scaffold generator, backups, logs, and embedde user guide.
Stars: ✭ 24 (+26.32%)
Mutual labels:  relay-modern
pyladies-courseware
Homework/task submit and review web app · based on React and Python aiohttp
Stars: ✭ 14 (-26.32%)
Mutual labels:  relay-modern
isomorphic-relay-app
Example isomorphic React-Relay-(Modern / Classic)-Router app and helper lib that connects to Artsy's GraphQL service
Stars: ✭ 13 (-31.58%)
Mutual labels:  relay-modern
docker-react-native-android
Docker image used to build React Native projects for Android
Stars: ✭ 28 (+47.37%)
Mutual labels:  relay-modern
GraphQL-Client-Exploration
Simple exploration of GraphQL Clients
Stars: ✭ 18 (-5.26%)
Mutual labels:  relay-modern
react-relay-appsync
AppSync for Relay
Stars: ✭ 19 (+0%)
Mutual labels:  relay-modern
datalist
Turns your data into a table with Relay Modern RefetchContainer
Stars: ✭ 12 (-36.84%)
Mutual labels:  relay-modern
relay-store-types-generator
Generate types for the Relay store from your GraphQL schema.
Stars: ✭ 17 (-10.53%)
Mutual labels:  relay-modern
relay-modern-future
Relay Modern Future: Hooks + Suspense
Stars: ✭ 25 (+31.58%)
Mutual labels:  relay-modern
graphql-ufc-api
GraphQL server for UFC's public API
Stars: ✭ 26 (+36.84%)
Mutual labels:  relay-modern
next-dashboard
A complete React/Redux/Relay/Next.js dashboard example
Stars: ✭ 65 (+242.11%)
Mutual labels:  relay-modern
React Firebase Starter
Boilerplate (seed) project for creating web apps with React.js, GraphQL.js and Relay
Stars: ✭ 4,366 (+22878.95%)
Mutual labels:  relay-modern
relay-compiler-plus
Custom relay compiler which supports persisted queries
Stars: ✭ 68 (+257.89%)
Mutual labels:  relay-modern
blog-projects
🗄Projects used while writing my personal blog
Stars: ✭ 91 (+378.95%)
Mutual labels:  relay-modern

Facebook Arsenal

Starter kit for creating full-stack javascript apps with cutting edge Facebook development tools. It contains a React Native project with Relay modern support and a NodeJS + GraphQL server.

This repository also proposes a way to organize a large GraphQL server by creating separated modules.

The goal with this project it's to figure it out what are the best practices for integrating this technologies.

Work in progress, use it at your own risk.


alt tag

How to run it

Run this two script in different terminal window.

  1. Terminal 1:
$ cd server && npm install
$ npm start
  1. Terminal 2:
$ cd app && npm install
$ react-native run-ios

This example works out of the box, but if you change the GraphQL API you will need to compile your schema to make it work with Relay. The backend server needs to be running to perform this:

  1. In your React Native root project folder:
$ npm i get-graphql-schema -g
$ get-graphql-schema http://localhost:3001/graphql > ./schema.graphql
$ npm i relay-compiler -g
$ relay-compiler --src ./src --schema ./schema.graphql

You need to do this everytime you change your GraphQL API or everytime you change your Relay queries. I'm looking forward to automate this process.

Why this matters

It took me a lot to figure it out how to integrate Relay Modern in React Native and I don't want to start from scratch again. If you're planning to create something with this stack, maybe this could be helpful.

Lessons learned so far:

  1. GraphQL connections are not necessary to use Relay.
  2. GraphQL connections are useful with 1->N relationships in data.
  3. You don't need a Viewer object on the root of your GraphQL endpoint (all the Relay docs has it).
  4. Relay classic sucks, Relay Modern is easier.
  5. You should create a QueryRenderer for every Relay Query to GraphQL and a fragmentContainer for every React module that uses Relay data.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].