Code Monkey home page Code Monkey logo

laravel-graphql-relay's Introduction

laravel-grapql-relay

Use Facebook GraphQL with React Relay. This package extends graphql-php to work with Laravel and is currently a work in progress. You can reference what specifications GraphQL needs to provide to work with Relay in the documentation.

Although this package no longer depends on laraval-graphql, it laid the foundation for this package which likely wouldn't exist without it. It is also a great alternative if you are using GraphQL w/o support for Relay.

Because this package is still in the early stages, breaking changes will occur. We will keep the documentation updated with the current release. Please feel free to contribute, PR are absolutely welcome!

Installation

You must then modify your composer.json file and run composer update to include the latest version of the package in your project.

"require": {
    "nuwave/laravel-graphql-relay": "0.3.*"
}

Or you can use the composer require command from your terminal.

composer require nuwave/laravel-graphql-relay

Add the service provider to your config/app.php file

Nuwave\Relay\LaravelServiceProvider::class

Add the Relay & GraphQL facade to your app/config.php file

'GraphQL' => Nuwave\Relay\Facades\GraphQL::class,
'Relay' => Nuwave\Relay\Facades\Relay::class,

Publish the configuration file

php artisan vendor:publish --provider="Nuwave\Relay\LaravelServiceProvider"

Create a schema.php file and add the path to the config

// config/relay.php
// ...
'schema' => [
    'path'      => 'Http/schema.php',
    'output'    => null,
],

To generate a schema.json file (used with the Babel Relay Plugin):

php artisan relay:schema

You can customize the output path in the relay.php config file under schema.output

For additional documentation, look through the docs folder or read the Wiki.

laravel-graphql-relay's People

Contributors

chrissm79 avatar bcarroll22 avatar

Watchers

James Cloos avatar Jack Murray avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.