Skip to content

Commit

Permalink
fix: fix wrong export of subscription type
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Klesse committed Nov 11, 2024
1 parent 0bb09ca commit 9a5481b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export async function generateComposables(meta: GraphQLMeta): Promise<string> {
template.push('import type { InputFields } from \'#base-types/fields\';');
template.push('import { gqlQuery, gqlAsyncQuery, gqlMutation, gqlSubscription } from \'#imports\';');
template.push('import type { AsyncData, AsyncDataOptions } from \'nuxt/app\';\n');
template.push('import type { ReturnTypeOfSubscription, GraphqlError } from \'@lenne.tech/nuxt-base\';\n');
template.push('import type { ReturnTypeOfSubscription, GraphqlError } from \'#base-interfaces\';\n');

if (methods?.query) {
for (const query of methods.query) {
Expand Down
2 changes: 2 additions & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ export default defineNuxtModule<ModuleOptions>({
});
nuxt.options.alias['#base-types'] = resolver.resolve(nuxt.options.buildDir, 'base-types');
nuxt.options.alias['#base-types/*'] = resolver.resolve(nuxt.options.buildDir, 'base-types', '*');
nuxt.options.alias['#base-interfaces'] = resolver.resolve('runtime/interfaces');
nuxt.options.alias['#base-interfaces/*'] = resolver.resolve('runtime/interfaces', '*');

addImportsDir(resolver.resolve('runtime/classes'));
addImportsDir(resolver.resolve('runtime/composables'));
Expand Down

0 comments on commit 9a5481b

Please sign in to comment.