Introducing QueryMock’s Library: An Apollo GraphQL Module

Image of rendered data: title_01 location-reference About this location: name_01 description_01 address_01 phone_01 location-reference username_01 age_01
image of popup and the desired fields: QueryMock: Hi! Thanks for using mockQuery! We have prefilled the mock data fields with text. Replace any of the prefilled input boxes with your personalized mock data and then click submit. You can re-run the mockQuery function without the ‘P’ tag and your information will be retained. If you have any questions, please check out our docs. Query on! FIELDS: id, title, picture, name, description, address, phone, poster username, poster age, and poster thumbnail. At the end there is a submit button.
An image of the same pop up as described above with some of the fields entered. These are the fields entered: title: The Best Bread Store Ever! picture: automated url name: Ben’s Baker description: ~text299 address: ~address phone: ~phone poster username: ben_theBaker93 poster age: ~int poster thumbnail: ~photo. At the end there is a submit button.
Image of what is rendered including a watercolor abstract image with different colors including yellow, red, green, and dark blue. The top header title says: The Best Bread Store Ever. Below the picture is: About this location: Ben’s Bakery. The text written next: One dollar and eighty-seven cents. That was all. And sixty cents of it was in pennies. Pennies saved one and two at a time by bulldozing the grocer and the vegetable man and the butcher until one’s cheeks burned with the silent imputation of parsimony that such close dealing implied. Three. 2300 Oracle Way Austin, TX 78741 (737)867–1000. There is a circular image with swirls of color and then below that: ben_theBaker93 128.
Folder QueryTest with a file query.js located inside it.
This is an example of a query that will work with our product: const { gql } = require(‘apollo-graphql’); const dndChar = gql ` query class { class { name hit_die spellcasting { spellcasting_ability { name } } } } `
Example of query: const{gql} = require(‘apollo-graphql’); const dndChar = gql ` query class { class { name hit_die spellcasting { spellcasting_ability { name } } } } `
An image of what occurs inside of the terminal: create-schema — where is your query stored? — ./QueryTest/query.js — please declare the path you would like your schema stored : — ./QueryTest/schema.js — file appended
Image of file: QueryTest folder with files query.js and schema.js included in it.
Image of outputted schema: `type class { name: String! hit_die: String! spellcasting: String! } type spellcasting { spellcasting_ability: String! } type spellcasting_ability { name: String! } `

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store