Datasette-graphql

Latest version: v2.2

Safety actively analyzes 631274 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 7

0.11

Not secure
- 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](https://datasette-graphql-demo.datasette.io/graphql/fixtures). #40
- The generated GraphQL schema is now exposed at `/graphql/dbname.graphql` - e.g. [/graphql/github.graphql](https://datasette-graphql-demo.datasette.io/graphql/github.graphql) on the demo. #41
- The example queries in the [examples directory](https://github.com/simonw/datasette-graphql/tree/main/examples) now link to live demos for each query. #42

0.10

Not secure
- 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](https://datasette-graphql-demo.datasette.io/graphql?query=%7B%0A%20%20repos(filter%3A%20%5B%7Bstargazers_count%3A%20%7Bgt%3A%2010%7D%7D%5D)%20%7B%0A%20%20%20%20nodes%20%7B%0A%20%20%20%20%20%20full_name%0A%20%20%20%20%20%20stargazers_count%0A%20%20%20%20%20%20issues_list(first%3A%205%2C%20where%3A%20%22body%20like%20%27%25test%25%27%20or%20title%20like%20%27%25test%25%27%22%2C%20sort_desc%3A%20created_at)%20%7B%0A%20%20%20%20%20%20%20%20totalCount%0A%20%20%20%20%20%20%20%20nodes%20%7B%0A%20%20%20%20%20%20%20%20%20%20title%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D)):
graphql
{
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
}
}
}
}
}

0.9

Not secure
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:

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

See [table filters examples](https://github.com/simonw/datasette-graphql/blob/main/examples/filters.md) for more operations, and [column filter arguments](https://datasette.readthedocs.io/en/stable/json_api.html#column-filter-arguments) in the Datasette documentation for details of how those operations work.

0.8

Not secure
New `tablename_get` field for retrieving single rows, including by their primary key. 11

Example query ([try it out](https://datasette-graphql-demo.datasette.io/graphql?query=%7B%0A%20%20users_get(id%3A%209599)%20%7B%0A%20%20%20%20id%0A%20%20%20%20name%0A%20%20%20%20contributors_list(first%3A%205)%20%7B%0A%20%20%20%20%20%20totalCount%0A%20%20%20%20%20%20nodes%20%7B%0A%20%20%20%20%20%20%20%20repo_id%20%7B%0A%20%20%20%20%20%20%20%20%20%20full_name%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20contributions%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%20%0A%7D%0A)):
graphql
{
users_get(id: 9599) {
id
name
contributors_list(first: 5) {
totalCount
nodes {
repo_id {
full_name
}
contributions
}
}
}
}

0.7

Not secure
- You can now access related rows for an item based on incoming foreign keys, and paginate through them. [Demo](https://datasette-graphql-demo.datasette.io/graphql?query=%7B%0A%20%20repos(first%3A%205%2C%20search%3A%22datasette%22)%20%7B%0A%20%20%20%20nodes%20%7B%0A%20%20%20%20%20%20full_name%0A%20%20%20%20%20%20issues_list(first%3A%205)%20%7B%0A%20%20%20%20%20%20%20%20pageInfo%20%7B%0A%20%20%20%20%20%20%20%20%20%20endCursor%0A%20%20%20%20%20%20%20%20%20%20hasNextPage%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20totalCount%0A%20%20%20%20%20%20%20%20nodes%20%7B%0A%20%20%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%20%20%20%20title%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D). #27
- Tests are now partly driven by examples in the [examples/ folder](https://github.com/simonw/datasette-graphql/tree/main/examples). #30
- Disable `suggest_facets` during internal calls, for a performance improvement. 29

0.6

Not secure
- 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

Page 5 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.