Help in implementing data fetcher for a federated subgraph #192
Unanswered
shamin2021
asked this question in
Q&A
Replies: 1 comment 1 reply
-
you have to implement the Also, you can try the gateway locally that has sample subgraphs in the local registry folder. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have the following two schemas
Schema 1
type Query {
getFoo: Foo
}
type Foo @key(fields: "id"){
id: String
fooName: String
}
Schema 2
type Query {
getBar(barId: String): Bar
}
type Bar @key(fields: "id") {
id: String
barName: String
}
type Foo @extends @key(fields: "id") {
id: String @external
bar: Bar
}
and the service providers as
Bar
package org.example;
class ProductNameService implements ServiceProvider {
}
and
Food service
package org.example;
import com.google.common.collect.ImmutableMap;
import com.intuit.graphql.orchestrator.ServiceProvider;
import graphql.ExecutionInput;
import graphql.GraphQLContext;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
import java.util.concurrent.CompletableFuture;
class ProductReviewService implements ServiceProvider {
}
i have the main class as
package org.example;
public class Test {
}
but when executed i get the following error please hep me resolve this
ExecutionResultImpl{errors=[ExceptionWhileDataFetching{path=[getBar], exception=java.lang.IllegalAccessError: class com.intuit.graphql.orchestrator.common.ArgumentValueResolver tried to access private method 'void graphql.execution.ValuesResolver.()' (com.intuit.graphql.orchestrator.common.ArgumentValueResolver and graphql.execution.ValuesResolver are in unnamed module of loader 'app'), locations=[SourceLocation{line=1, column=9}]}], data={getBar=null}, dataPresent=true, extensions=null}
Beta Was this translation helpful? Give feedback.
All reactions