-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Describe the bug
Failed to retrieve children path when use on Windows.
To Reproduce
Please provide a code example or even better a test to reproduce the bug.
Only on windows.
In a schema with returns a connection and should have
edge {
node {
photo
}
}
For object
DataFetchingEnvironment env
List fields = toto.getFields("edges", "node/photo", "node\photo");
It does not return any fields
Problem comes from the resolve pattern
@Override
public List<SelectedField> getFields(String fieldGlobPattern, String... fieldGlobPatterns) {
if (fieldGlobPattern == null || fieldGlobPattern.isEmpty()) {
return emptyList();
}
computeValuesLazily();
List<String> targetNames = new ArrayList<>();
for (String flattenedField : flattenedFieldsForGlobSearching) {
for (String globPattern : mkIterable(fieldGlobPattern, fieldGlobPatterns)) {
PathMatcher globMatcher = globMatcher(globPattern);
Path path = Paths.get(flattenedField);
if (globMatcher.matches(path)) {
targetNames.add(flattenedField);
}
}
}
return toSetSemanticsList(targetNames.stream()
.flatMap(name -> normalisedSelectionSetFields.getOrDefault(name, emptyList()).stream()));
}Because this is on windows, the value for Path path = Paths.get(flattenedField);
will be edge\node\photo
But the mkIterable(fieldGlobPattern, fieldGlobPatterns) produce :
- edge
- edge\node\photo
- edge\node\photo
So no matching.
Metadata
Metadata
Assignees
Labels
No labels