You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2020. It is now read-only.
In the above example, glob would ultimately look for files ending in .js or .graphql which are literally in a directory called {path/to}.
This occurs because the underlying library performing the globbing (minimatch), does not expand glob braces when there's only a single value inside those braces. For instance, some implementations of glob (such as your shell) expand {foo} into foo. Minimatch does not perform an expansion in this case. It's unclear if this is by design or not.
When includes contains multiple glob paths, this behavior does not occur because, as one would expect, minimatch correctly expands {path/a,path/b}/**/*.{js, graphql} into ['path/a/**.{js, graphql}', 'path/a/**.{js, graphql}'].
The end result is that fragments are not cached when graphql-language-service first loads in the above case. Caching is thus delayed until each file has changed (a fact which is learned only after being notified by watchman or via language service protocol).
The text was updated successfully, but these errors were encountered:
If
.graphqlconfig
contains anincludes
key, with only a single glob such as below, the resulting set of matched files will always be empty.In the above example, glob would ultimately look for files ending in
.js
or.graphql
which are literally in a directory called{path/to}
.This occurs because the underlying library performing the globbing (minimatch), does not expand glob braces when there's only a single value inside those braces. For instance, some implementations of glob (such as your shell) expand
{foo}
intofoo
. Minimatch does not perform an expansion in this case. It's unclear if this is by design or not.When
includes
contains multiple glob paths, this behavior does not occur because, as one would expect, minimatch correctly expands{path/a,path/b}/**/*.{js, graphql}
into['path/a/**.{js, graphql}', 'path/a/**.{js, graphql}']
.The end result is that fragments are not cached when graphql-language-service first loads in the above case. Caching is thus delayed until each file has changed (a fact which is learned only after being notified by watchman or via language service protocol).
The text was updated successfully, but these errors were encountered: