GraphQL API Playground with cascade-like operations

Related tags

Database modif
Overview

modif ( 🍖 👉 🥪 )

modif is a small GraphQL API with transform capabilities. It takes a string input and outputs a string. Always.

TL;DR

Examples

Some cool examples to start you by:

# Operation
query UppercaseString($value: String!) {
  modify(value: $value) {
    uppercase {
      value
    }
  }
}

# Variables
{
  "value": "i'm a lowercase string"
}
# Operation
query GetEmailAddressDomain(
  $value: String!
  $arg1: String!
  $concatArg1: String!
) {
  modify(value: $value) {
    starts(arg1: $arg1) {
      removeWhiteSpace {
        concat(arg1: $concatArg1) {
          value
        }
      }
    }
  }
}

# Variables
{
  "value": "My email address is pedro@palhari.dev",
  "arg1": "@",
  "concatArg1": " is the email address' domain"
}
# Operation
query GetStreetNameFromCEP(
  $value: String!
  $arg1: String!
  $arg2: String!
  $concatArg1: String!
) {
  modify(value: $value) {
    onlyNumbers {
      viaCEP {
        between(arg1: $arg1, arg2: $arg2) {
          concat(arg1: $concatArg1) {
            value
          }
        }
      }
    }
  }
}

# Variables
{
  "value": "My house is located at 15370-496",
  "arg1": "logradouro:",
  "arg2": "|",
  "concatArg1": " is the street I live"
}

How does it work?

Using GraphQL attribute resolving as a runtime recursive transformer of the input. The GraphQL server is made of a single Object called ModifierObject.

Inside ModifierObject all the modifiers are declared and return their own ModifierObject. The only static variable is the value, a string.

Attributes are resolved at runtime using an obscure function attribute called length. This allows me to generate the arguments for this function when the server boots up.

You can check all of that, under great detail and in a manifesto-kinda way of programming on graphql/GraphQLModifiers.ts.

Contributing

Have a great idea or want to add more modifiers to it? Check out modifiers/StringModifiers.ts and make sure you read the concept on graphql/GraphQLModifiers.ts to know what I want this to eventually end.

Running locally

  • Clone the repo
  • yarn
  • Either node pm2.js or yarn dev:g
    • The latter is prefered as it has nodemon and --enable-source-maps capabilities.
    • A server will spawn under http://localhost:6780, navigate to it to query the API

Early FAQ

  • Hey, why don't you use X instead of Apollo Studio Sandbox?

I like the Sandbox. It's visually great, let me do a lot of work visually.

  • Why can't I do Y?

Very very early stage toy. But check Contributing up above and make yourself at home.

You might also like...

Workshop to illustrate how to use GraphQL

Workshop to illustrate how to use GraphQL

🎓 Netflix Clone using Astra DB and GraphQL 50 minutes, Intermediate, Start Building A simple ReactJS Netflix homepage clone running on Astra DB that

Jan 4, 2023

Learn GraphQL PIAIC CNC Class code

GraphQL using React! Steps (for 01 - react-graphql) Generate and copy Access Token from Github Personal Acess Token Create .env file in project folder

Jan 2, 2023

Código desenvolvido na mentoria do Hiring Coders utilizando Express e GraphQL

hiringcoders-graphql Código desenvolvido na mentoria do Hiring Coders utilizando Express e GraphQL Contribuições A ideia do repositório é continuar si

Dec 29, 2022

A lightweight way to cache on graphQL servers

A lightweight way to cache on graphQL servers

cacheflowQL What is cacheflowQL? CacheflowQL is an npm package with complex caching algorithms that provide developers deep insights into their GraphQ

Nov 16, 2022

A template for WebSockets powered Cloudflare Worker project using graphql-ws

🚡 graphql-ws on Cloudflare Workers A template for WebSockets powered Cloudflare Worker project using graphql-ws. The worker serves the following rout

Dec 18, 2022

A Crypto App built to pracitse GraphQL Federation

Getting Started To start this project please first create a .env file in the root of your project with the following: REACT_APP_ASTRA_TOKEN={your_astr

Dec 28, 2022

A GraphQL Generator for Mongo and CosmosDB

A GraphQL Generator for Mongo and CosmosDB

A GraphQL Function Starter Kit for Cosmos DB This is a starter kit for rapid development of a GraphQL API using the Mongo driver for Cosmos DB. You cr

Nov 12, 2021

Very easy graphQL example made by Bobby Chao

Very easy graphQL example made by Bobby Chao. The folder has been organized, the module has been split, and it can be directly used as a development scratch. It using graphQL + node.js + express, and MySQL as datasource.

Sep 18, 2022

Graphql & Apollo

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts After fetch the project, please install n

Dec 21, 2021
Owner
Pedro Palhari
Pato
Pedro Palhari
curl for GraphQL with autocomplete, subscriptions and GraphiQL. Also a dead-simple universal javascript GraphQL client.

graphqurl graphqurl is a curl like CLI for GraphQL. It's features include: CLI for making GraphQL queries. It also provisions queries with autocomplet

Hasura 3.2k Jan 3, 2023
GraphQL Fastify Server is an implementation of GraphQL.

GraphQL Fastify Server Installation Usage Using cache Middlewares Liveness & Readiness Contributing License Installation npm install --save graphql-fa

Rui Silva 33 Dec 19, 2022
A JSON Database that saves your Json data in a file and makes it easy for you to perform CRUD operations.

What is dbcopycat A JSON Database that saves your Json data in a file and makes it easy for you to perform CRUD operations. ⚡️ Abilities Creates the f

İsmail Can Karataş 13 Jan 8, 2023
Execute one command (or mount one Node.js middleware) and get an instant high-performance GraphQL API for your PostgreSQL database!

PostGraphile Instant lightning-fast GraphQL API backed primarily by your PostgreSQL database. Highly customisable and extensible thanks to incredibly

Graphile 11.7k Jan 4, 2023
Unofficial API Documentation for the Axie Infinity's GraphQL Endpoint.

Axie GraphQL Documentation API Documentation for the Axie Infinity GraphQL Endpoint. Customization Guide This site is usings rocketseat. You may refer

Shane Maglangit 101 Nov 24, 2022
Starter template for NestJS 😻 includes GraphQL with Prisma Client, Passport-JWT authentication, Swagger Api and Docker

Instructions Starter template for ?? NestJS and Prisma. Checkout NestJS Prisma Schematics to automatically add Prisma support to your Nest application

notiz.dev 1.6k Jan 4, 2023
around nestjs, with prisma and some graphql lib,write less code,create power api

介绍 这是一个 prisma + nestjs + graphql 的集成示例 对于开发者来说,特别是使用 graphql 的时候,只需要写非常少量的代码即可完成数据的各种操作,同时也支持接口透传。 开发&部署 本地开发 npm run start:dev swagger 地址:http://loc

芋头 26 Nov 24, 2022
A GraphQL wrapper of the DeSo API.

DeSo GraphQL A DeSo GraphQL wrapper sitting on top of the DeSo HTTP API. What is DeSo (Decentralized Social) DeSo is a new type of blockchain designed

WAGMI Labs 11 Nov 20, 2022
Conjure SQL from GraphQL queries 🧙🔮✨

Sqlmancer Conjure SQL from your GraphQL queries ?? ?? ✨ ⚠️ This project is currently on hiatus. I am hoping to resume working on Sqlmancer once I have

Daniel Rearden 132 Oct 30, 2022
Application made to show the basic concepts of GraphQL with Apollo Server

graphql-insta-example Application made to show the basic concepts of GraphQL with Apollo Server. Getting Started Run npm install Run npm run dev Go to

Ana Julia Bittencourt 26 Aug 26, 2022