Question on how to define queries on Domain types?
See original GitHub issueI am new to GraphQL so any help would be appreciated. Currently I understand if I have to define queries on Domain types, I will need to add annotations in the same file, something like this:
public class A {
private String id;
private List<B> bList;
@GraphQLQuery(name = "bList")
public List<B> getBListByX(@GraphQLArgument(name = "x") final String x)
}
This generates schema like:
type A {
id: String
bList(x: String): [B]
}
We have existing POJOs which we want to use for generating the schema but I do not want to add the query annotations on the POJO itself. Is there any way in which I can add the queries separately in a different file, without having to handwrite all POJOs
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
DNS Types: Types of DNS Records, Servers and Queries - NS1
Need a refresher on DNS concepts? This post introduces DNS and explains: 3 types of DNS queries—recursive, iterative, and non-recursive; 3 types of...
Read more >DNS query types and how to use DNS in performance ...
Type “NS” (Name Server) to get information about the authoritative name server. Type “SOA” (Start Of zone Authority): used when transferring ...
Read more >What Is a DNS Query? How does it work? - Bunny.net
A DNS query is a message sent by the client to the DNS server and can be one of 3 different types: Non-Recursive...
Read more >What is DNS? How Domain Name System works - TechTarget
Learn about the domain name system, how it works, the types of DNS servers in use, DNS security concerns and the history of...
Read more >What is a DNS query? - ClouDNS
An attempt to reach a domain, is actually a DNS client querying the DNS servers to get the IP address, related to that...
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
Oh, just by the name of
QUERY_ROOT
I can tell you’re using an old version of SPQR. Earlier implementations used to behave differently in that nested queries would also be exposed as top level (taking the context argument explicitly). Plus, there may have been a bug making the nested one also expect an argument. Please try using the latest (0.9.6 at the moment, and 0.9.7 coming out by the end of the week). It should behave as expected there.Great! v0.9.7 will have deduping logic for methods between queries and mutations (the current logic dedupes only within one type), so these errors should go away permanently. Closing this one.