Postgraphile: Hiding objects from schema generation.

Created on 26 Jan 2017  路  3Comments  路  Source: graphile/postgraphile

I may have missed this, but is there a way to hide objects from appearing in the schema?

I tried revoking privelages on individual tables, but I imagine the schema generation is taking place through reading postgress schemas.

Any hints?

Most helpful comment

@angelosarto There's no blacklist functionality yet, but how I do it is moving things that I wish to be accessible into a specific schema for postgraphql.

All 3 comments

@angelosarto There's no blacklist functionality yet, but how I do it is moving things that I wish to be accessible into a specific schema for postgraphql.

This is actually a great answer and will do exactly what I need.

Plus, since you can specify multiple schemas to introspect it is possible to have this arrangement.

Server |Parameters
-|-
graphql_external_unauth |--schema unauth_api
graphql_external_auth |--schema unauth_api,auth_api
graphql_internal |--schema unauth_api,auth_api,private

So each server can show different apis but be the same underneath.

@angelosarto that鈥檚 a pretty cool use case 馃槉

Was this page helpful?
0 / 5 - 0 ratings