Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support table allow-listing #4

Open
simonw opened this issue Aug 2, 2020 · 2 comments
Open

Support table allow-listing #4

simonw opened this issue Aug 2, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Owner

simonw commented Aug 2, 2020

Currently all tables are exposed. Allow plugin configuration to say "only expose these tables and views".

This will be particularly useful for explicitly designing a GraphQL API, since that can be done by carefully creating SQL views and then exposing just them.

@simonw simonw added the enhancement New feature or request label Aug 2, 2020
@simonw simonw added this to the First non-alpha release milestone Aug 2, 2020
@simonw
Copy link
Owner Author

simonw commented Aug 3, 2020

Config design:

{
  "plugins": {
    "datasette-graphql": {
      "databases": {
        "github": {
          "tables": ["issues", "repos"]
        }
      }
    }
  }
}

This also leaves space for supporting multiple databases later - #9 - and as a starting point can show an error if you try to start up with more than one database configured since only one is currently supported.

simonw added a commit that referenced this issue Aug 3, 2020
Also added basic configuration validation, refs #4
@simonw
Copy link
Owner Author

simonw commented Aug 3, 2020

I don't need this for the first non-alpha release - it makes more sense to implement this along with canned queries in #16.

@simonw simonw modified the milestones: First non-alpha release, 1.0 Aug 3, 2020
@simonw simonw removed this from the 1.0 milestone Aug 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant