GithubHelp home page GithubHelp logo

apollographql / apollo-rs Goto Github PK

View Code? Open in Web Editor NEW
560.0 33.0 39.0 4.42 MB

Spec compliant GraphQL Tools in Rust.

License: Apache License 2.0

Rust 99.98% Python 0.02%
graphql rust parser graphql-tools apollo compiler graphql-compiler graphql-parser

apollo-rs's Introduction

apollo-rs

Rust tooling for low-level manipulation of the GraphQL language.

Tools included

This project is intended to house a number of tools related to the low-level workings of GraphQL according to the GraphQL specification. Nothing in these libraries is specific to Apollo, and can freely be used by other projects which need standards-compliant GraphQL tooling written in Rust. The following crates currently exist:

  • apollo-compiler - a library to compile and semantically analyze GraphQL query language.
  • apollo-parser - a library to parse the GraphQL query language.
  • apollo-smith - a test case generator to test GraphQL code (SDL).

Please check out their respective READMEs for usage examples.

Status

apollo-rs is a work in progress. Please check out the ROADMAP for upcoming features we are working on building.

If you do end up trying out apollo-rs and run into trouble, we encourage you to open an issue.

Design Principles

  1. Prioritizing developer experience. Elegant and ergonomic APIs is the theme for Rust as a language, and we want to make sure that all component APIs we provide are aligned with these principles.

  2. Stability and reliability. Spec-compliant, and idempotent APIs which, when complete, can be used safely in enterprise-grade codebases.

  3. Diagnostics. The tools are to be written in a way that will allow us to produce detailed diagnostics. It does not panic or return early if there is a lexical or a syntactic error. Instead, the parser is meant to gather as much context and information as possible and return errors alongside the output that is valid. Coincidentally, this allows for easily debuggable code for those maintaining this project.

  4. Extensibility. The parser is written to work with different use cases in our budding Rust GraphQL ecosystem, be it building schema-diagnostics for Rover, or writing out query planning and composition algorithms in Rust. These all have quite different requirements when it comes to AST manipulation. We wanted to make sure we account for them early on.

Rust versions

apollo-rs is tested on the latest stable version of Rust. Older version may or may not be compatible.

License

Licensed under either of

at your option.

apollo-rs's People

Contributors

aaronarinder avatar abernix avatar allancalix avatar aschaeffer avatar bnjjj avatar bryncooke avatar dariuszkuc avatar erikwrede avatar everlastingbugstopper avatar garypen avatar geal avatar glasser avatar gocamille avatar goto-bus-stop avatar jregistr avatar jrschild avatar lrlna avatar maxnachlinger avatar midaslamb avatar o0ignition0o avatar peakematt avatar rishabh3112 avatar simonsapin avatar svc-secops avatar tinnou avatar yanns avatar zackangelo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apollo-rs's Issues

Parser

Description

Tracking issue for the parser.

Requirements

Specified elsewhere.

Subtasks

  • TODO

parse fragment

  • parse FragmentSpread
  • parse InlineFragment
  • parse FragmentDefinition
  • parse FragmentName

parse scalars

  • parse ScalarTypeDefinition
  • parse ScalarTypeExtension

typed ast: parse graphql types

using generated nodes from #3 and syntax kinds from #2 we need to be able to create parse rules for the following graphql types:

  • #9
  • #10
  • #11
  • #12
    • #13
    • parse OperationDefinition
    • #44
  • #20
    • parse InlineFragment
    • parse FragmentDefinition
    • parse FragmentName
  • #21
  • #22
  • #31
  • #32
  • #33
  • #34
  • #35
  • #36
  • #37
  • #38
  • #39
  • #40
  • #42
  • #41
  • #43
  • #45
  • #46
  • #47
  • #48
    • parse ScalarTypeDefinition
    • parse ScalarTypeExtension
  • #49
  • #50
  • #51
  • #52
  • #53
    • parse InterfaceTypeDefinition
    • parse InterfaceTypeExtension
  • #54
    • parse UnionTypeDefinition
    • parse UnionMemberTypes
    • parse UnionTypeExtension
  • #55
    • parse EnumTypeDefinition
    • parse EnumValuesDefinition
    • parse EnumValueDefinition
    • parse EnumTypeExtension
  • #56
    • parse ArgumentsDefinition
    • parse InputValueDefinition
    • parse InputObjectTypeDefinition
    • parse InputFieldsDefinition
    • parse InputObjectTypeExtension
  • #57
    • parse Directives
    • parse Directive
    • parse DirectiveDefinition
    • parse DirectiveLocations
    • parse DirectiveLocation
    • parse ExecutableDirectiveLocation
    • parse TypeSystemDirectiveLocation
  • parse whitespace and other ignored tokens #79
  • #72
  • #71
  • #83

parse values

  • parse Value
  • parse StringValue (in lexer)
  • parse FloatValue (in lexer)
  • parse IntValue (in lexer)
  • parse BooleanValue (in lexer)
  • parse NullValue
  • parse EnumValue
  • parse ListValue
  • parse ObjectValue

parse Description

  • parse string character
  • parse block string character
  • parse comment

The distinction can be done in the lexer. It can create two different tokens: StringValue and Comment.

parse operations

  • parse OperationDefinition
  • parse OperationType
  • parse OperationTypeDefinition

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.