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
- Visit our website: genesisQL Beta
- Enter an endpoint to retrieve your data from (e.g. https://swapi.co/api/people/2/)
- Enter a name for your object type, and select input field names & types from the dropdown menu. Toggle if needed
- Use the '+' button to add more fields as needed
- Press submit to generate your schema output
- Use the copy button to quickly select the outputted code, and paste it into your project folder as a new file
- Install apollo server using a package manager of your choice: e.g. 'npm i apollo-server --save'
- 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 usinghttps://github.com/joanaz/HireDot2.git
Step 2
- HACK AWAY!
π¨ π¨ π¨
Step 3
π Create a new pull request usinghttps://github.com/oslabs-beta/genesisQL/compare
.