Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema directories containing index.ts causes issues in generated index.ts #110

Closed
dtymon opened this issue Jun 21, 2021 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@dtymon
Copy link

dtymon commented Jun 21, 2021

When using convertFromDirectory, if the schema directory contains an index.ts file this results in the corresponding generated index.ts containing the TypeScript types defined directly inline rather than exporting via their generated files.

For example, without an index.ts in the schema directory, the generated index.ts correctly looks something like:

export * from './Artist';
export * from './ArtistList';
export * from './NewArtist';

However, if an index.ts exists in the schema directory, the generated index.ts becomes:

export interface Artist {
  ...
}
export interface ArtistList {
  ...
}
export interface NewArtist {
  ...
}

The generation of index.ts should be the same regardless of the presence of a schema index.ts

@mrjono1 mrjono1 added the bug Something isn't working label Sep 9, 2021
@vamcs
Copy link
Contributor

vamcs commented Nov 4, 2021

We have this exact same problem and the generated index.ts file is gonna get too big soon 😅. Isn't #123 ready?

Edit: ok, it works to add ignoreFiles: ['index.ts']! I'll go with that for now 🙂

@mrjono1
Copy link
Owner

mrjono1 commented Apr 20, 2022

to be fixed by #218

@mrjono1
Copy link
Owner

mrjono1 commented Apr 20, 2022

new option available in 4.0.0 to resolve this: inputFileFilter

@mrjono1 mrjono1 closed this as completed Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants