graphile-meta-schema
v0.2.5
Published
graphile meta schema
Downloads
58
Maintainers
Readme
graphile-meta-schema
npm install graphile-meta-schema
example query
query MetaQuery {
_meta {
tables {
name
fields {
name
type {
name
}
}
constraints {
... on MetaschemaForeignKeyConstraint {
fields {
name
}
refTable {
name
fields {
name
}
}
refFields {
name
}
}
... on MetaschemaPrimaryKeyConstraint {
__typename
fields {
name
type {
name
}
}
name
}
... on MetaschemaUniqueConstraint {
__typename
name
fields {
name
type {
name
}
}
}
... on MetaschemaCheckConstraint {
__typename
name
fields {
name
type {
name
}
}
}
}
}
}
}
testing
createdb metaschema_example
psql metaschema_example < sql/test.sql
psql metaschema_example < sql/types.sql