Fragments extension
Pre-release
Pre-release
An example from Readme
let baseUserFragment = orm.table('user').fragment('base')
let basePostFragment = orm.table('post').fragment('base')
orm.table('user').createFragment('some_unique_name', [
baseUserFragment.gqlFields(),
{
key: 'posts',
values: [
basePostFragment.gqlFields(),
]
}
])
/*
This will create schema with all base user and posts fields
{
...userfields
posts {
...postsfields
}
}
*/