@drizzle-graphql-suite/client 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types.d.ts +1 -1
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ type Simplify<T> = {
|
|
|
36
36
|
export type InferResult<TDefs extends AnyEntityDefs, TEntity extends EntityDef, TSelect> = Simplify<InferScalars<TEntity, TSelect> & InferRelations<TDefs, TEntity, TSelect>>;
|
|
37
37
|
type InferScalars<TEntity extends EntityDef, TSelect> = Pick<TEntity['fields'], keyof TSelect & keyof TEntity['fields']>;
|
|
38
38
|
type InferRelations<TDefs extends AnyEntityDefs, TEntity extends EntityDef, TSelect> = {
|
|
39
|
-
[K in keyof TSelect & keyof TEntity['relations'] as TSelect[K] extends Record<string, unknown> ? K : never]: TEntity['relations'][K] extends RelationDef ? TEntity['relations'][K]['entity'] extends keyof TDefs ? TEntity['relations'][K]['type'] extends 'many' ? InferResult<TDefs, TDefs[TEntity['relations'][K]['entity']], TSelect[K]>[] :
|
|
39
|
+
[K in keyof TSelect & keyof TEntity['relations'] as TSelect[K] extends Record<string, unknown> ? K : never]: TEntity['relations'][K] extends RelationDef ? TEntity['relations'][K]['entity'] extends keyof TDefs ? TEntity['relations'][K]['type'] extends 'many' ? InferResult<TDefs, TDefs[TEntity['relations'][K]['entity']], TSelect[K]>[] : InferResult<TDefs, TDefs[TEntity['relations'][K]['entity']], TSelect[K]> | null : never : never;
|
|
40
40
|
};
|
|
41
41
|
export type ClientConfig<TSchema extends SchemaDescriptor = SchemaDescriptor> = {
|
|
42
42
|
url: string | (() => string);
|