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

Comment parsing fails if other @ comments are included #622

Open
Tam opened this issue Nov 29, 2024 · 1 comment
Open

Comment parsing fails if other @ comments are included #622

Tam opened this issue Nov 29, 2024 · 1 comment

Comments

@Tam
Copy link

Tam commented Nov 29, 2024

I'm using Postgraphile to generate a GraphQL schema from a Postgres database. Postgraphile has the concept of Smart Tags that, similar to the @type comment, use the @ symbol to be recognised.

If I have a comment like this, everything works fine:

comment on column public.attachment.file is E'@type(FileMetadata, ''../../services/Types.d'', true, false, true)';
file: FileMetadata;

But if I start including Postgraphile Smart Tags, it breaks:

comment on column public.attachment.file is E'
@behaviour -*
@type(FileMetadata, ''../../services/Types.d'', true, false, true)
';
/** \n@behaviour -*\n@type(FileMetadata, '../../services/Types.d', true, false, true)\n */
file: unknown;

Incidentally, Postgraphile also has a @type comment. So far I haven't run into conflicts with it, but that's probably because I haven't used either very much!

@kristiandupont
Copy link
Owner

Right, that would be a problem! I guess I should make those tags optional as I don't think many people use them and it's probably better solved with a hook instead. I will ponder this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants