• Stars
    star
    272
  • Rank 151,235 (Top 3 %)
  • Language
    Rust
  • License
    MIT License
  • Created over 2 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

GraphQXL is a new language built on top of the GraphQL syntax that extends the original language with some additional features useful for creating scalable and big server side schemas. This repository contains the source code for the GraphQXL compiler.

Coverage Status Book

GraphQXL is a new language built on top of the GraphQL syntax that extends the original language with some additional features useful for creating scalable and big server side schemas.

Documentation

There is a WIP version of the GraphQXL book with some useful docs, you can check it here

Features

Object inheritance

Use the spread operator to inherit fields from other types or inputs. Descriptions will also be inherited.

Try it yourself!

Source GraphQXL Compiled GraphQL
type _OtherType {
    "Descriptions are also inherited"
    bar: Int!
}

type MyType {
    foo: String!
    ..._OtherType
}
                              #GraphQXL
type MyType {
    foo: String!
    "Descriptions are also inherited"
    bar: Int!
}




                               #GraphQL

Generics

Declare generic types and inputs in order to reuse common structures across your schema.

Try it yourself!

Source GraphQXL Compiled GraphQL
type Generic<T> {
    foo: T
}

type MyStringType = Generic<String!>

type MyIntType = Generic<Int!>

                              #GraphQXL
type MyStringType {
    foo: String!
}

type MyIntType {
    foo: Int!
}

                               #GraphQL

Modifiers

Modify types and inputs with built-in modifiers.

Try it yourself!

Source GraphQXL Compiled GraphQL
type _MyType {
    foo: String
    bar: String!
}

type MyTypeRequired = Required<_MyType>

type MyTypeOptional = Optional<_MyType>

                            #GraphQXL
type MyTypeRequired {
    foo: String!
    bar: String!
}

type MyTypeOptional {
    foo: String
    bar: String
}
                               #GraphQL

Import statements

Import other .graphqxl files and use their definitions in the current file.

Source GraphQXL Compiled GraphQL
# my_file.graphqxl
import "other_file"

type MyType {
    foo: OtherType!
}
                              #GraphQXL
# other_file.graphqxl
type OtherType {
    bar: Int!
}
                              #GraphQXL
# my_file.graphql
type OtherType {
    bar: Int!
}

type MyType {
    foo: OtherType!
}






                               #GraphQL

Install

For brew users:

brew install graphqxl

There is built-in support for the following programming languages:

There are also precompiled binaries for each architecture that you can download directly from GitHub releases:

Mac M1

wget https://github.com/gabotechs/graphqxl/releases/latest/download/graphqxl-aarch64-apple-darwin.tar.gz
tar -xvf graphqxl-aarch64-apple-darwin.tar.gz

Mac Intel

wget https://github.com/gabotechs/graphqxl/releases/latest/download/graphqxl-x86_64-apple-darwin.tar.gz
tar -xvf graphqxl-x86_64-apple-darwin.tar.gz

Linux x86_64

wget https://github.com/gabotechs/graphqxl/releases/latest/download/graphqxl-x86_64-unknown-linux-gnu.tar.gz
tar -xvf graphqxl-x86_64-unknown-linux-gnu.tar.gz

Linux aarch64

wget https://github.com/gabotechs/graphqxl/releases/latest/download/graphqxl-aarch64-unknown-linux-gnu.tar.gz
tar -xvf graphqxl-aarch64-unknown-linux-gnu.tar.gz

Usage

./graphqxl foo.graphqxl

this will output foo.graphql as a result

More Repositories

1

dep-tree

Tool for helping developers keep their code bases clean and decoupled. It allows visualising a code base complexity using a 3d force-directed graph of files and the dependencies between them.
Go
1,497
star
2

MusicGPT

Generate music based on natural language prompts using LLMs running locally
Rust
608
star
3

signway

Bring the power of pre-signed URLs to your apps. Signway is a gateway for redirecting ephimeral signed URLs to the requested API
Rust
85
star
4

react-stl-viewer

React component for visualizing 3d STL models in the browser using three.js
TypeScript
84
star
5

react-gcode-viewer

React component for visualizing GCodes in the browser using three.js
TypeScript
31
star
6

dynarust

A DynamoDB odm library for rust
Rust
14
star
7

cv

TypeScript
4
star
8

market-monitor

Monitor tool for stocks and cryptocurrencies that includes twitter sentiment analysis on key accounts
Python
4
star
9

lazaro

Reinforcement learning framework for implementing custom models on custom environments using state of the art RL algorithms
Python
4
star
10

pyargparse

Awesome configuration parser for Python programs which can parse from command line, environment variables and .yml files with a single class definition providing type hints for the parsed arguments
Python
3
star
11

wall-runner

Experimental physics based game made with bevy and the bevy's plugins ecosystem
Rust
1
star
12

graphqxl-idea-plugin

Java
1
star
13

graphqxl-explorer

TypeScript
1
star
14

free-ec2-instance

Infrastructure as code using AWS CDK to deploy an EC2 instance with just one command. This project allows to quickly deploy an EC2 instance for playing around without incurring in bigger costs
TypeScript
1
star
15

node-graphqxl

Node wrapper for the GraphQXL compiler https://github.com/gabotechs/graphqxl
JavaScript
1
star
16

datafusion-fiddle

TypeScript
1
star