Coder Social home page Coder Social logo

jonas-jonas / gql Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gql-dart/gql

0.0 0.0 0.0 460 KB

Libraries supporting GraphQL in Dart

License: MIT License

Dart 99.65% Shell 0.04% Dockerfile 0.02% Kotlin 0.12% Swift 0.11% Objective-C 0.01% HTML 0.05%

gql's Introduction

gql-dart/gql

This is an effort to advance the Dart GraphQL ecosystem.

It consists of multiple packages and libraries centered around GraphQL AST.

Core

The core of this project is the GraphQL parser which parses GraphQL strings into an AST. The parsed AST can then be transformed, visited and printed back to GraphQL string.

Pub Package Library Description
version package:gql ast.dart GraphQL AST implementation with Visitor pattern and AST transformer
version package:gql language.dart GraphQL source parser and printer. Recognizes both operations and SDL
version package:gql document.dart Document and schema validation

Code generation

GraphQL language enables code generation to speed up development and move document processing to build-time.

We provide code builders to generate Dart source code and file builders which easily plug into standard Dart code generation pipeline.

Ideas for future work:

  • Typed resolvers for field resolution on the client or server
Pub Package Library Description
version package:gql_code_builder Various builders
version package:gql_build File builders

Client

To enable development of GraphQL clients, we provide type definitions used to execute GraphQL operations. They include AST-based operation, request with per operation context, and response. These types are used by the Links.

Link is the current client implementation. Link is GraphQL AST-aware request/response middleware. They can be used to build a pipeline to deduplicate requests, conditionally transform requests and responses (including the context), and eventually send the requests to the server.

Ideas for future work:

  • websocket link for subscriptions
  • batched request HTTP link
  • retry link to handle network issues transparently
  • link for client-side request resolution
Pub Package Library Description
version package:gql_exec gql_exec.dart Implementation of types for GraphQL requests and responses
version package:gql_link link.dart Base for modular GraphQL execution interface
version package:gql_http_link gql_http_link.dart Link to execute GraphQL requests via HTTP
version package:gql_dedupe_link gql_dedupe_link.dart De-duplicating Link to avoid execution of identical requests
version package:gql_transform_link gql_transform_link.dart GQL Link to transform Requests and Responses. May be used to update context, document, variables, data, errors, etc.

Other

Pub Package Library Description
version package:gql_pedantic Lint rules used by all gql-dart/gql packages
version package:multipack Development tool to ease working in this monorepo setup

Examples

Pub Package Library Description
version package:gql_example_cli Example usage in a CLI environment
version package:gql_example_flutter Example usage in a Flutter environment

Users

Project Description
artemis Build dart types from GraphQL schemas and queries (using Introspection Query).
graphql A stand-alone GraphQL client for Dart, bringing all the features from a modern GraphQL client to one easy to use package.
graphql_flutter A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package.
normalize Normalization and denormalization of GraphQL responses in Dart
gql_client GraphQL Client for Dart
graphql-to-dart generate dart classes and respective JsonSerializable transcoders
graphql_server Base package for implementing GraphQL servers.
Your project? Open a PR to add it to this readme!

Contributing

The goal of this project is to expand Dart GraphQL ecosystem and building a community around this vendor-neutral implementation.

That said, this project is in it's early days and the best way to contribute currently is to open issues with questions about current and future scope and features of this project.

Features and bugs

Please file feature requests and bugs at the GitHub.

gql's People

Contributors

comigor avatar jonas-jonas avatar klavs avatar micimize avatar smkhalsa avatar

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.