naystack 1.4.37 → 1.5.0

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.
@@ -1,7 +1,7 @@
1
1
  export { GQLError } from './errors.mjs';
2
2
  export { initGraphQLServer } from './init.mjs';
3
3
  export { AuthorizedContext, Context } from './types.mjs';
4
- export { FieldLibrary, QueryLibrary, ResponseType, field, query } from './utils.mjs';
4
+ export { FieldLibrary, FieldResponseType, QueryLibrary, QueryResponseType, field, query } from './utils.mjs';
5
5
  import 'graphql/error';
6
6
  import '@apollo/server';
7
7
  import 'next/server';
@@ -1,7 +1,7 @@
1
1
  export { GQLError } from './errors.js';
2
2
  export { initGraphQLServer } from './init.js';
3
3
  export { AuthorizedContext, Context } from './types.js';
4
- export { FieldLibrary, QueryLibrary, ResponseType, field, query } from './utils.js';
4
+ export { FieldLibrary, FieldResponseType, QueryLibrary, QueryResponseType, field, query } from './utils.js';
5
5
  import 'graphql/error';
6
6
  import '@apollo/server';
7
7
  import 'next/server';
@@ -42,6 +42,7 @@ declare function QueryLibrary<T extends Record<string, QueryDefinition<any, any,
42
42
  declare function FieldLibrary<X extends object, T extends Record<string, FieldResolverDefinition<any, any, X, any, any, any, any>> = Record<string, FieldResolverDefinition<any, any, X, any, any, any, any>>>(type: ClassType, queries: T): {
43
43
  new (): {};
44
44
  };
45
- type ResponseType<T extends QueryDefinition<any, any, any, any, any, any>> = Awaited<ReturnType<T["call"]>>;
45
+ type QueryResponseType<T extends QueryDefinition<any, any, any, any, any, any>> = Awaited<ReturnType<T["call"]>>;
46
+ type FieldResponseType<T extends FieldResolverDefinition<any, any, any, any, any, any, any>> = Awaited<ReturnType<T["call"]>>;
46
47
 
47
- export { FieldLibrary, QueryLibrary, type ResponseType, field, query };
48
+ export { FieldLibrary, type FieldResponseType, QueryLibrary, type QueryResponseType, field, query };
@@ -42,6 +42,7 @@ declare function QueryLibrary<T extends Record<string, QueryDefinition<any, any,
42
42
  declare function FieldLibrary<X extends object, T extends Record<string, FieldResolverDefinition<any, any, X, any, any, any, any>> = Record<string, FieldResolverDefinition<any, any, X, any, any, any, any>>>(type: ClassType, queries: T): {
43
43
  new (): {};
44
44
  };
45
- type ResponseType<T extends QueryDefinition<any, any, any, any, any, any>> = Awaited<ReturnType<T["call"]>>;
45
+ type QueryResponseType<T extends QueryDefinition<any, any, any, any, any, any>> = Awaited<ReturnType<T["call"]>>;
46
+ type FieldResponseType<T extends FieldResolverDefinition<any, any, any, any, any, any, any>> = Awaited<ReturnType<T["call"]>>;
46
47
 
47
- export { FieldLibrary, QueryLibrary, type ResponseType, field, query };
48
+ export { FieldLibrary, type FieldResponseType, QueryLibrary, type QueryResponseType, field, query };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naystack",
3
- "version": "1.4.37",
3
+ "version": "1.5.0",
4
4
  "description": "A stack built with Next + GraphQL + S3 + Auth",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",