Giter Club home page Giter Club logo

airgql's People

Contributors

ad-si avatar prescientmoon avatar

Stargazers

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

Watchers

 avatar  avatar

airgql's Issues

Migrate to latest GraphiQL version

Currently, doing so produces this error:

GQL error

A possible lead might be Introspection.hs line 1370. Replacing said line and other similar lines with something like typeInt doesn’t fix the issue though.

The difference in the introspection query produced by the bump is the following (newest on the left)

GQL introspection result

Return partial result on int overflow

Right now it doesn’t return any rows if one entry overflows:

"data": {
  "misc": null
},

However, it should return the correct entries like this:

{
  "data": {
    "misc": [
      {
        "int_col": 2343
      },
      {
        "int_col": null
      },
      {
        "int_col": 5
      },
    ]
  },
  "errors": [
    {
      "locations": [
        {
          "column": 5,
          "line": 3
        }
      ],
      "message": "Unable to coerce result to Int.",
      "path": [
        "misc",
        2,
        "int_col"
      ]
    }
  ]
}

Add support for “dry-run” GraphQL queries

Can probably be achieved by translating it to EXPLAIN QUERY PLAN SQL queries.

This would be great for writing front-end tests, where the fron-end sends a few GraphQL queries on initial usage to check whether the backend changed.

Support upsert conflicts for non-unique columns

From docs (https://www.sqlite.org/lang_upsert.html):

The UPSERT processing happens only for uniqueness constraints. A "uniqueness constraint" is an explicit UNIQUE or PRIMARY KEY constraint within the CREATE TABLE statement, or a [unique index](https://www.sqlite.org/lang_createindex.html#uniqueidx).

I wonder if we should also support it for other columns. This would then be executed by the server, since SQLite doesn’t support it. Basically if insert causes an error, run:

UPDATE "users"
SET name = 'Marc'
WHERE name == 'John'

(Must be one transaction)

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.