Coder Social home page Coder Social logo

graphql-project's Introduction

GraphQL Playground Example

README_RUS: Русская версия README.

GraphQL Implementation in Rust using ntex, juniper, mysql with r2d2 for Database

The example is based on graphql-demo

Database

Create a new database for this project, and import the existing database schema has been provided named mysql-schema.sql.

Create .env file on the root directory of this project and set environment variable named DATABASE_URL, the example file has been provided named .env.example

Usage

cd graphql-project

cargo run

http://127.0.0.1:8080/graphiql

Use GraphQL

GraphQL provides its own documentation. Click the "docs" link in the top right of the GraphiQL UI to see what types of queries and mutations are possible.

Create a new user record

mutation {
  createUser(
    user: { name: "Pavel", email: "[email protected]"}
  ) {
    id
    name
    email
  }
}

Query to get all users

{
  users{
    name
    email
  }
}

graphql-project's People

Contributors

vladlinmoiseenko avatar

Watchers

 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.