All Projects → oslabs-beta → Genesisql

oslabs-beta / Genesisql

rapid schema-prototyping tool for GraphQL applications

Programming Languages

javascript
184084 projects - #8 most used programming language

genesisQL Logo

MIT license Build Status GitHub release Open Source Love svg2

genesisQL

genesisQL is an open-source web-application that enables rapid schema-prototyping of GraphQL applications, making your development process easier & faster. Made for developers, by developers.

Created by Adam Goren, Tom Herrmann, Xose Manolo, and Andrew Paisner.

See the full demo video here: genesisQL Walkthrough

Features

  • Generate graphQL schemas, types, and queries, through an intuitive graphical user interface (GUI)
  • Easily select which fields you'd like to use in your schema, from an automatically generated dropdown menu
  • Ability to specify whether fields are required or not
  • View data retrieved from API urls with a single search, in app
  • Copy generated schema code to clipboard with a single button click
  • Outputted code can be used to set-up/run a functional apollo-server, and access the graphQL playground

Usage

  1. Visit our website: genesisQL Beta
  2. Enter an endpoint to retrieve your data from (e.g. https://swapi.co/api/people/2/)
  3. Enter a name for your object type, and select input field names & types from the dropdown menu. Toggle if needed
  4. Use the '+' button to add more fields as needed
  5. Press submit to generate your schema output
  6. Use the copy button to quickly select the outputted code, and paste it into your project folder as a new file
  7. Install apollo server using a package manager of your choice: e.g. 'npm i apollo-server --save'
  8. Simply run the new file, and the graphQL playground will appear

Example Code Output

  const { ApolloServer, gql } = require('apollo-server');

  const typeDefs = gql` 

  type starwars_traits {
    name: String!
    mass: Int
    homeworld: String
  }

  type Query {
    getAllstarwars_traits: [starwars_traits]
    getstarwars_traitsById(id: ID!): starwars_traits
  }

  type Mutation {
    addstarwars_traits(name: String!, mass: Int, homeworld: String, ): Boolean
    updatestarwars_traits(name: String!, mass: Int, homeworld: String, ): Boolean
    deletestarwars_traits(id: ID): Boolean
  }

  `; 

  const resolvers = {
  };

  const port = process.env.PORT || 4000; // defaults to port 4000 
  const server = new ApolloServer({ typeDefs, resolvers });

  server.listen({ port }).then(({ url }) => {
    console.log(`🚀  Server listening at ${url}`);
  });

Contributing

To get started...

Step 1

  • Option 1

    • 🍴 Fork this repo!
  • Option 2

    • 👯 Clone this repo to your local machine using https://github.com/joanaz/HireDot2.git

Step 2

  • HACK AWAY! 🔨🔨🔨

Step 3

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].