queryParser with fragments
See original GitHub issueI am using Github API v4 schema (see attached file), for a simple query: “show me the issues of the actual viewer”.
Running this query produce an error:
There is no query called issues on the Schema
because “issues” is not wrapped by “viewer”, then not matching the schema. I debugged the code, and it is coming from: https://github.com/EasyGraphQL/easygraphql-tester/blob/a9931d460ce560fcdf7395ca923c3643aef7026b/lib/queryParser.js#L165
easygraphql-tester = v3.0.4
@estrada9166 do you have some hint regarding handling fragments? may be some example?
const appQuery = graphql`
query appQuery {
viewer {
...issues_viewer
}
}
fragment issues_viewer on User
@argumentDefinitions(
count: {type: "Int", defaultValue: 10}
cursor: {type: "String"}
orderBy: {
type: "IssueOrder"
defaultValue: {field: CREATED_AT, direction: DESC}
}
) {
issues(first: $count, after: $cursor, orderBy: $orderBy)
@connection(key: "viewer_issues") {
edges {
node {
...issuesNode @relay(mask: false)
}
}
}
}
fragment issuesNode on Issue @relay(mask: false) {
id
title
repository {
name
}
viewerDidAuthor
state
}
`;
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
FragmentsBuilder (Lucene 2.9.4 API)
queryParser.standard.builders ... FragmentsBuilder is an interface for fragments (snippets) builder classes. ... create multiple fragments.
Read more >Parsing query string inside fragment with Elm - Stack Overflow
The Url parser just treats Url fragment as a String but you can replace # with ? before parsing: Maybe.withDefault url <| Url.fromString ......
Read more >QueryParser - javadoc.io
object QueryParser. GraphQL query parser ... def parseOperation(op: Operation, fragments: Map[String, FragmentDefinition]): Result[UntypedOperation].
Read more >How to use Term method in org.apache.lucene.queryParser ...
Returns a String where those characters that QueryParser expects to be escaped are escaped, i.e. pre ... onRequestPermissionsResult (Fragment) ...
Read more >Example usage for org.apache.lucene.search.highlight ...
String result;// w ww . j a v a 2 s . c om QueryParser parser = new ... which gives highlighted fragments...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@artola There’s a new version that solves this issue
v3.0.5
can you try please, so we can close this issue!!Also, thank you for reporting the issue like this, with all this information, it was really useful!
@artola Thank you so much for creating this issue!! I’ll push the fix soon!