Closed hartshorne closed 7 years ago
@hartshorne plz share the 'file.tsx' source and '.gqlconfig'.
.gqlconfig:
{
schema: {
files: 'web/src/graphql/schema.graphql'
},
query: {
files: [{
match: 'web/src/**/*.ts*',
parser: [
'EmbeddedQueryParser',
{
startTag: 'gql`',
endTag: '`'
}
]
}]
}
}
file.tsx:
// © 2017
import { gql } from '../lib/graphql';
gql`
fragment Account on Query {
accounts {
id
}
}
`;
problems:
file: 'file:///.../web/src/file.tsx'
severity: 'Error'
message: 'Syntax Error: Cannot parse the unexpected character "\u2009".'
at: '1,5'
source: 'graphql'
the issue was due to Unicode thin space character between © and 2017 which you should not use in code as it's always hard to detect the presence, anyway pushed the fix v2.2.4
thanks!
.gqlconfig
{
schema: {
files: {
include: 'apps/**/*.graphql'
}
},
query: {
files: [
{
match: 'apps/**/*.ts',
parser: ['EmbeddedQueryParser', { startTag: 'gql`', endTag: '`' }]
}
]
}
}
I face this issue here. any idea?
I guess it because of this. When I hover it, the tooltip say that graphql language server has stop I have installed watchman and @playlyfe/gql correctly. Have no idea why this happen
Here is log from output
The red icon comes in two scenaros:
watchman shutdown-server
, and then reload the vscode window (Reload Window
) - this would start watchman again.Also, please open a different issue for your problem. Discussing it here will make searching for it harder for future users.
@sandangel Looks like the path to schema files is wrong that is why server not starting.
hmm..., the gql service is running now, but I still don't have syntax highlight with embedded schema, it work with .graphql file though, here is my screenshot.
@sandangel share output of graphql-for-vscode plugin. Is ide features working in above file?
yeah, IDE features is working but gql plugin seem to be not
vscode theme?
I use One Dark Italic Theme, I have also tried another theme but it just not work
I can confirm that when I add a schema file to project and hover the embedded string, it show the tooltips but there are still no syntax highlighting
wow I got it. That was because of Angular Component Extension plugin of onixie, after disable it, syntax highlighting worked. Thank you very much
obviously not a critical error, but spews a bunch of noise.