Coder Social home page Coder Social logo

karl-horning / graphql-playground Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 110 KB

GraphQL Playground is a simple GraphQL server implementation with a built-in playground for testing queries and mutations.

License: MIT License

JavaScript 100.00%
graphql apollo-server prisma javascript node-js npm sqlite sql backend api

graphql-playground's Introduction

GraphQL Playground

GraphQL Playground is a simple GraphQL server implementation with a built-in playground for testing queries and mutations.

Features

  • GraphQL Server: Provides a GraphQL server with a set of predefined schemas, resolvers, and middleware.
  • Rate Limiting: Implements a rate limiter using the rate-limiter-flexible library to control request rates.
  • Graceful Shutdown: Handles graceful shutdown on receiving the SIGINT signal for a clean server shutdown.
  • Apollo Server: Utilizes Apollo Server for serving GraphQL requests with enhanced features.

Table of Contents

Installation

  1. Clone the repository:

    git clone https://github.com/Karl-Horning/graphql-playground.git
  2. Install dependencies:

    cd graphql-playground
    npm install
  3. Set up your environment variables:

    Create a .env file in the project root and define the required variables:

    PORT=4000
    # Add other environment variables as needed
  4. Start the GraphQL Playground:

    npm start

Usage

Visit http://localhost:4000/graphql in your browser to access the GraphQL Playground. You can use the interactive playground to explore and test GraphQL queries and mutations.

Configuration

The following environment variables can be configured in the .env file:

  • PORT: The port on which the server will run. Default is 4000.

Endpoints

  • GraphQL Playground: http://localhost:4000/graphql

Testing

To run tests, use the following command:

npm test

Contributing

Contributions are welcome! Feel free to open issues, submit pull requests, or provide feedback.

License

This project is licensed under the MIT License.

Author

Karl Horning: GitHub | LinkedIn | CodePen

graphql-playground's People

Contributors

karl-horning 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.