datasette-graphql

Datasette plugin providing an automatic GraphQL API for your SQLite databases

APACHE-2.0 License

Downloads
3.6K
Stars
97
Committers
2

Bot releases are hidden (Show)

datasette-graphql - 0.12.3

Published by simonw about 4 years ago

  • Fix for 400 error with CORS headers. #49
datasette-graphql - 0.12.2

Published by simonw about 4 years ago

  • Fixed bug triggered by columns with a name _likethis_. #48
datasette-graphql - 0.12.1

Published by simonw about 4 years ago

  • Fixed bug affecting tables with a primary key column called 'type'. #46
datasette-graphql - 0.12

Published by simonw about 4 years ago

  • Renamed tablename_get to tablename_row. #36
  • Support operationName. #37
  • Support GET as well as POST for executing GraphQL queries. #6
  • Handle tables and columns with names that are not valid GraphQL identifiers. #10
  • Foreign key _list relationships now work with non-integer keys. #45
datasette-graphql - 0.11

Published by simonw about 4 years ago

  • No longer exposes hidden tables, e.g. SQLite's _fts tables. #39
  • Test fixtures database is now deployed as part of the live demo - see /graphql/fixtures. #40
  • The generated GraphQL schema is now exposed at /graphql/dbname.graphql - e.g. /graphql/github.graphql on the demo. #41
  • The example queries in the examples directory now link to live demos for each query. #42
datasette-graphql - 0.10

Published by simonw about 4 years ago

  • New where: argument that accepts a fragment of SQL to add to the WHERE clause, as an alternative for if the query is too complex to express using filter:. #26
  • Nested relationships now support the filter:, sort:, sort_desc:, search: and where: arguments. #38

Example query using these new features (try this query):

{
  repos(filter: [{stargazers_count: {gt: 10}}]) {
    nodes {
      full_name
      stargazers_count
      issues_list(first: 5, where: "body like '%test%' or title like '%test%'", sort_desc: created_at) {
        totalCount
        nodes {
          title
        }
      }
    }
  }
}
datasette-graphql - 0.9

Published by simonw about 4 years ago

Table filtering has a new, better design. #25

Retrieving all records with license of "apache-2.0" and a stargazers_count greater than 10 now looks like this:

{
  repos(filter: {license: {eq: "apache-2.0"}, stargazers_count: {gt: 10}}) {
    nodes {
      full_name
      stargazers_count
      license {
        key
      }
    }
  }
}

See table filters examples for more operations, and column filter arguments in the Datasette documentation for details of how those operations work.

datasette-graphql - 0.8

Published by simonw about 4 years ago

New tablename_get field for retrieving single rows, including by their primary key. #11

Example query (try it out):

{
  users_get(id: 9599) {
    id
    name
    contributors_list(first: 5) {
      totalCount
      nodes {
        repo_id {
          full_name
        }
        contributions
      }
    }
  } 
}
datasette-graphql - 0.7

Published by simonw about 4 years ago

  • You can now access related rows for an item based on incoming foreign keys, and paginate through them. Demo. #27
  • Tests are now partly driven by examples in the examples/ folder. #30
  • Disable suggest_facets during internal calls, for a performance improvement. #29
datasette-graphql - 0.6

Published by simonw about 4 years ago

  • Removed disable_cors setting in favour of re-using the existing datasette --cors flag, which means you have to opt-in rather than opt-out of CORS. #28
  • BLOB columns are now output encoded using base64. #13
datasette-graphql - 0.5

Published by simonw about 4 years ago

  • Enable CORS access, unless disable_cors plugin configuration setting is set. #24
datasette-graphql - 0.4

Published by simonw about 4 years ago

  • Support views as well as tables. #23
  • Support multiple databases. #9
datasette-graphql - 0.3

Published by simonw about 4 years ago

  • Implemented search: argument for running searches against tables configured to use SQLite FTS. #22
  • Implemented sort: and sort_desc: arguments. #21
datasette-graphql - 0.2

Published by simonw about 4 years ago

  • First non-alpha release
  • Supports GraphQL pagination using nodes, edges, pageInfo and totalCount. #2
  • No longer throws an error if you try to expand a null foreign key. #20
datasette-graphql - 0.1a4

Published by simonw about 4 years ago

  • GraphQL variable support. #14
  • auto_camelcase plugin setting. #15
datasette-graphql - 0.1a3

Published by simonw about 4 years ago

  • Foreign key relationships can now be expanded using nested GraphQL syntax. #3
  • Tables can now be filtered using the new table_name(filters: [...]) argument. #12
datasette-graphql - 0.1a2

Published by simonw about 4 years ago

datasette-graphql - 0.1a1

Published by simonw about 4 years ago

  • Now includes GraphiQL interface, and correctly returns introspection metadata. #1
datasette-graphql - 0.1a

Published by simonw about 4 years ago

  • Initial proof of concept