graphqld 0.16.0

A library to handle the GraphQL Protocol


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

GraphqlD: A graphql implementation for the D Programming language

alt text

Graphql is a query language for apis. Given a query like for the schema in folder test.

{
  shipsselection(ids:[44,45]) {
    id
    commander {
      name
    }
  }
}

You get back json that looks like:

{
  "error": [],
  "data": {
    "shipsselection": [
      {
        "id": 44,
        "commander": {
          "name": "Kathryn Janeway"
        }
      },
      {
        "id": 45,
        "commander": {
          "name": "Jonathan Archer"
        }
      }
    ]
  }
}

Graphiql type-ahead works, this makes schema introspection a lot nicer.

Features

This graphql implementation is based on June 2018 spec.

Operation Execution

  • [x] Scalars
  • [x] Objects
  • [x] Lists of objects/interfaces
  • [x] Interfaces
  • [x] Unions
  • [x] Arguments
  • [x] Variables
  • [x] Fragments
  • [x] Directives
  • [x] Include
  • [x] Skip
  • [?] Custom (Requires changing the graphqld source)
  • [x] Enumerations
  • [x] Input Objects
  • [x] Mutations
  • [ ] Subscriptions (This needs vibe.d websocket integration)
  • [x] Async execution (when used with vibe.d blocking resolver are async by default)

Validation

  • [ ] Arguments of correct type
  • [ ] Default values of correct type
  • [x] Fields on correct type
  • [x] Fragments on composite types
  • [ ] Known argument names
  • [x] Executable Definition
  • [ ] Known directives
  • [x] Known fragment names
  • [x] Known type names
  • [x] Lone anonymous operations
  • [x] No fragment cycles
  • [x] No undefined variables
  • [x] No unused fragments
  • [x] No unused variables
  • [x] Overlapping fields can be merged (this is done during execution)
  • [ ] Possible fragment spreads
  • [ ] Provide non-null arguments
  • [x] Scalar leafs
  • [x] Unique argument names
  • [x] Unique directives per location
  • [x] Unique fragment names
  • [ ] Unique input field names
  • [x] Unique operation names
  • [x] Unique variable names
  • [ ] Variables are input types
  • [x] Variables in allowed position
  • [x] Single root field

Schema Introspection

  • [x] __typename
  • [x] __type
  • [x] name
  • [x] kind
  • [x] description
  • [x] fields
  • [x] interfaces
  • [x] possibleTypes
  • [x] enumValues
  • [x] inputFields
  • [x] ofType
  • [x] __schema
  • [x] types
  • [x] queryType
  • [x] mutationType
  • [x] subscriptionType
  • [x] directives

Comfort Features

  • [ ] Query AST cache
  • [ ] Json to resolver argument extractor
  • [ ] SQL query generation from AST
  • [x] Custom Leaf types (e.g. GQLDCustomLeaf!(std.datetime.DateTime))

Thank you to graphql-dot for the excelent list of features

Documentation

The Documentation is still WIP, please have a look at the vibe.d project in the test folder.

Contributing

PRs are welcome!

About Kaleidic Associates

We are a boutique consultancy that advises a small number of hedge fund clients. We are not accepting new clients currently, but if you are interested in working either remotely or locally in London or Hong Kong, and if you are a talented hacker with a moral compass who aspires to excellence then feel free to drop me a line: laeeth at kaleidic.io

We work with our partner Symmetry Investments, and some background on the firm can be found here:

http://symmetryinvestments.com/about-us/

Authors:
  • Robert burner Schadek
Dependencies:
nullablestore, vibe-d:data, vibe-d:core, fixedsizearray, darser
Versions:
5.1.5 2023-Dec-15
5.1.4 2023-Oct-30
5.1.3 2023-Sep-08
5.1.2 2023-Sep-08
5.1.1 2023-Aug-22
Show all 118 versions
Download Stats:
  • 9 downloads today

  • 60 downloads this week

  • 194 downloads this month

  • 8690 downloads total

Score:
3.1
Short URL:
graphqld.dub.pm