GraphQL Schema – The Beginner’s Guide to GraphQL Editor p.1

GraphQL Editor is a tool for both advanced users and those only starting to work on GraphQL APIs.

On the off chance you don’t know anything about GraphQL Editor it’s a web tool that lets you see and better understand how the schema and various element…


This content originally appeared on DEV Community and was authored by Tomek Poniatowicz

GraphQL Editor is a tool for both advanced users and those only starting to work on GraphQL APIs.

On the off chance you don't know anything about GraphQL Editor it's a web tool that lets you see and better understand how the schema and various elements within it work, even if you’re not a programmer.

You can even build a schema by joining the visualized blocks and having GraphQL Editor generate the code for them. That’s just the basics and tool has lots of other useful features a bunch of them added in the recent GraphQL Editor v. 4.5 update.

Schema

So let’s try it out and set up a very basic schema that should be easy to grasp even for someone completely new to GraphQL. Let’s start by setting up the contact form input:

  • Let's add strings (email and message),
  • we want make them required.

Schema

Creating Mutations

Now it's time for the types. First let's add a mutation, for this sample mutation we will:

  • add a type & set it as a mutation,
  • make it required,
  • add boolean.

Mutations

Query

All we need now is a query to fetch the data, for that first lets:

  • make a form type with strings for email and message, Form
  • For the query we do the same thing we did before: add type, select query and once again make it required.
  • Now let's make it fetch from the form we made above so remember to check required and also check array and array required here as well. Query

And it's done

As you can see as we finished this last step it automatically rounds it out as a schema and we can even find out how it looks in the visualization:

Visualization

And that’s it, you just created a simple GraphQL schema that can fetch two basic values like emails and messages from a database. Obviously, we haven't even scratched the surface of what GraphQL Editor can do so hopefully you’ll stick around to see what we do next time.

A guest blog post for GraphQL Editor blog by Michał Tyszkiewicz

Speed up your GraphQL API development

GraphQL Editor is a supportive tool for both advanced GraphQL users as well as those taking their first steps with GraphQL APIs. Our all-in-one development environment for GraphQL will help you build, manage & deploy your GraphQL API much faster. Try GraphQL Editor for free!

New features of GraphQL Editor gif


This content originally appeared on DEV Community and was authored by Tomek Poniatowicz


Print Share Comment Cite Upload Translate Updates
APA

Tomek Poniatowicz | Sciencx (2021-04-19T10:45:37+00:00) GraphQL Schema – The Beginner’s Guide to GraphQL Editor p.1. Retrieved from https://www.scien.cx/2021/04/19/graphql-schema-the-beginners-guide-to-graphql-editor-p-1/

MLA
" » GraphQL Schema – The Beginner’s Guide to GraphQL Editor p.1." Tomek Poniatowicz | Sciencx - Monday April 19, 2021, https://www.scien.cx/2021/04/19/graphql-schema-the-beginners-guide-to-graphql-editor-p-1/
HARVARD
Tomek Poniatowicz | Sciencx Monday April 19, 2021 » GraphQL Schema – The Beginner’s Guide to GraphQL Editor p.1., viewed ,<https://www.scien.cx/2021/04/19/graphql-schema-the-beginners-guide-to-graphql-editor-p-1/>
VANCOUVER
Tomek Poniatowicz | Sciencx - » GraphQL Schema – The Beginner’s Guide to GraphQL Editor p.1. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/04/19/graphql-schema-the-beginners-guide-to-graphql-editor-p-1/
CHICAGO
" » GraphQL Schema – The Beginner’s Guide to GraphQL Editor p.1." Tomek Poniatowicz | Sciencx - Accessed . https://www.scien.cx/2021/04/19/graphql-schema-the-beginners-guide-to-graphql-editor-p-1/
IEEE
" » GraphQL Schema – The Beginner’s Guide to GraphQL Editor p.1." Tomek Poniatowicz | Sciencx [Online]. Available: https://www.scien.cx/2021/04/19/graphql-schema-the-beginners-guide-to-graphql-editor-p-1/. [Accessed: ]
rf:citation
» GraphQL Schema – The Beginner’s Guide to GraphQL Editor p.1 | Tomek Poniatowicz | Sciencx | https://www.scien.cx/2021/04/19/graphql-schema-the-beginners-guide-to-graphql-editor-p-1/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.