Skip to content

oslabs-beta/peach

Repository files navigation


Logo

README

GitHub contributors license last commit Repo stars

Peach QE

A Relay visualizer for all your GraphQL queries.
Homepage →
Product Hunt Page →


Explore the docs »



Logo



Table of Contents
  1. About The Project
  2. Deployment
  3. Getting Started
  4. Deployment
  5. License
  6. Acknowledgements

About The Project

Peach QE is the first Relay visualizer to handle all your GraphQL queries under one roof, directly on your desktop.

Upload pre-written queries, live-edit the queries you want to explore, variable inputs, and even handle as many databases as required.


Built With


Getting Started

  • Fork and Clone the Repo:

    git clone https://github.com/oslabs-beta/peach.git

Prerequisites

Install the dpendencies:

  • [ npm i ]

    npm install
  • Run the Electron App locally

    npm start

Deployment

  1. In order to build the executable file (aka, the desktop client) you will need to run specific commands for your OS:
  • Mac:

    npm run package-mac
  • Windows:

    npm run package-win
  • Linux:

    npm run package-linux
  1. Look for the directory Release-builds in the root folder where you cloned this Repo. (created automatically by the previous command)

  2. Find the specific folder for your OS. (e.g., peachQE-win)

  3. The file peachQE.exe (in Windows) will launch the app in your machine.


In every case, you will need to add the file schema.graphql to the root directory and the file imported.js to the directory src>relay. For example:

.
├── (Root)                    # Installed Root folder
├── schema.graphql
├── src   
    ├── relay                 # Create both folders
          ├── imported.js     
│   
└── ...



User Manual

Once you have the application running, you will notice that PeachQE operates in two different "modes":

Relay Proper

When the application first opens, the window will by default display "Relay Proper" mode, which contains much of the core functionality of the application:

Relay Proper Mode

  1. The left section of the window is reserved for the Schema Display. Here, you can:

    • View your current schema and type into the searchbar to find specific fields.
    • Import a new Schema, updating the contents of the schema display to contain the newly imported schema.
    • Update the GraphQL API url endpoint. This determines what API PeachQE is interacting with.
  2. Below the Schema Display you will find the Variable Input. Here you can:

    • Manually enter variables as JSON objects.
    • The Variable Input will interact with the Query Input to set the response in the Reponse Display.
  3. The central section is reserved for the Query Input. Here you can:

    • Manually type in valid GraphQL queries.
    • Select previous queries from the Query History dropdown. Once clicked the selected query will populate the Query Input Field.
    • Submit your query.
  4. The right section is the Response Display which, upon clicking the Submit Query button, will display the reponses to any submitted query.

Peach Mode

Peach Mode

By clicking the yellow button titled Peach Mode at the top right corner of the window, or simply by scrolling down, you will find our designated UI for Relay specific functionality.

While the Response Display functions entirely the same, the central and left sections have been altered to accomodate for Relay-specific functionality.

  1. The left section still contains a Variable Input with two additional fields:

    1. The Query File Uploader simply directs you to the "Peaches" dropdown from the menu bar, where you can "Start a New Peach" by uploading a file containing a list of GraphQL Queries.
    2. The Store Display offers you a direct visual of the Relay Store, a Relay-specific functionality that stores all the data sent by your GraphQL Queries, and all the data sent back from the responding GraphQL API. It is effectively a log of your interactions with a given GraphQl API, and it is made available with PeachQE!
  2. The central section contains 2 new components:

    1. The Query Editor where you may copy/paste or manually type in multiple GraphQl Queries. Upon clicking Save Edited Query, the user inputted text will be saved and rendered as Relay queries, which will be displayed in the New Query Selector.
    2. The New Query Selector will contain a list of queries matching the queries inputted in the Query Editor. You may then toggle between these queries, and the Response display will update with the currently selected query.

Enjoy!



For more information, please visit our website

Download App



License

Distributed under the MIT License. See LICENSE for more information.


Acknowledgements to the PEach QE team:



THANK YOU!

About

A query explorer built for Relay

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published