Log in to GraphQL Editor
Mock Backend - The Beginner's Guide to GraphQL Editor p.2
Michal

Michał Tyszkiewicz

4/30/2021

Mock Backend - The Beginner's Guide to GraphQL Editor p.2

Last time we put together a pretty basic schema, so let's take a look at how it works. First just to make navigating everything later a bit easier let’s look at versions. For that we check out the manage version option, so far there isn't anything there so let’s make it official and submit what we made last time as version 1.0 of our project.

Deploy new version

While this might not seem like much right now it will make things a lot easier down the line (or at least it does for me while writing these).

Mock backend

Now it's time to check out the Mock Backed feature which lets you actually see how things work. The little rocket icon (🚀) does just that. Before we get to play around with it we need to deploy it.

Deploy backend

Here on the left we can see fakeable types and all we need to do now is write a query (you can even copy paste it) and after that press play. As you can see our query and schema work and we got a few fake responses to show for it.

Query

We can adjust what is faked by clicking the email and message strings on the left. You can select what it will fake to get a better idea of what you’d get with that query, I chose :

  • email addresses for emails (duh),
  • random words for messages.

You can also manually add values if that better fits what you’re aiming for.

Values

You can also probably spot some of the additional features:

  • you can prettify queries which makes them easier to read,
  • merge multiple queries into one and take advantage of autocomplete support,
  • there’s also a query history feature which lets you go through your queries in this session.

Prettify and history

While these might not seem particularly useful now, bear in mind so far we’ve been dealing with a very basic schema and a very simple query. As you can imagine it won't always be as simple as that and as the schema gets more robust things will get more complicated. We’re probably going to look at doing just that next time, so see you then.

Check out our other blogposts

A look at what using TypeScript with GraphQL can do for you
Michał Tyszkiewicz
Michał Tyszkiewicz
A look at what using TypeScript with GraphQL can do for you
5 min read
almost 3 years ago
Slash GraphQL - a fully managed GraphQL backend service
Michał Tyszkiewicz
Michał Tyszkiewicz
Slash GraphQL - a fully managed GraphQL backend service
4 min read
over 3 years ago
Top GraphQL tutorials reviewed 2019
Robert Matyszewski
Robert Matyszewski
Top GraphQL tutorials reviewed 2019
15 min read
over 4 years ago

Ready for take-off?

Elevate your work with our editor that combines world-class visual graph, documentation and API console

Get Started with GraphQL Editor