Giter VIP home page Giter VIP logo

statooine's Introduction

Statooine

Training project for GraphQL.

Set up the project

You need Docker for running this project.

Add this in you hosts file: 127.0.0.1 statooine.localhost

Run the project: docker-compose up

Go to http://statooine.localhost:88/graphiql

Exercise

  1. Build a simple graphql schema regarding the following domain rules:

Project used to manipulate Euromillion draws.

  • A draw has a date at least.
  • A Draw is compose by a collection of numbers.
  • A number has a value and a position.
  • A number may be a star one or not.
  • Star numbers values from 1 to 10.
  • Non star numbers values from 1 to 50.
  • A draw is composed by a set of 5 common numbers and 2 star numbers.

1.1 create the Draw type 1.2 create the Number type

Type files are supposed to be in the ``````````config/graphql/types`` repository Following the overblog/graphql configuration: dir: "%kernel.project_dir%/config/graphql/types"

  1. Define a graphql query in order to get a draw by its date. 2.1 Create a Query type and add the query there Once your graphql schema is up with your query. Don't forget to compile it.

  2. Create a resolver for your query. Adding the Query type file is not OK. We should create a Resolver for our query if we want to get our draw.

  3. Add a ResolverMap

Usefull commands

make dev-start Build the project then run it (with docker-compose)

make dev-stop Stop the project

make db-setup Set up the db (with fixtures \o/)

make shell A shell to statooine container

make graphql-compile Compile graphql files

statooine's People

Contributors

mtrudu avatar

Stargazers

 avatar

Watchers

James Cloos avatar  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.