liontariai / samarium

https://liontari.ai/
Apache License 2.0
14 stars 0 forks source link

Implement $scalars helper functions to select all scalar fields #4

Closed liontariai closed 4 months ago

liontariai commented 4 months ago

Usage:

const { aliasedQuery } = await spacex((op) => ({
    aliasedQuery: op.query(({ company }) => ({
        company: company(({ $scalars, headquarters }) => ({
            ...$scalars(),
            hq: headquarters(({ $scalars }) => ({
                ...$scalars(),
            })),
        })),
    })),
}));