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
ExecutorInstrumentation doesn't resolve fetchers which invokes a data loader.
To Reproduce
Sample Schema:
type Query {
account(id: String): Account
}
type Account {
id: String!
name: String!
transactions: [Transaction!]
}
type Transaction {
id: String!
accountId: String!
amount: numeric!
}
record Account(String id, String name) {}
record Transaction(String id, String accountId, double amount) {}
public static class AccountFetcher implements TrivialDataFetcher<Account> {
@Override
public Account get(DataFetchingEnvironment environment) throws Exception {
return new Account("id", "name");
}
}
public static class TransactionFetcher
implements DataFetcher<CompletionStage<List<Transaction>>> {
@Override
public CompletionStage<List<Transaction>> get(DataFetchingEnvironment environment)
throws Exception {
Account account = environment.getSource();
DataLoader<String, List<Transaction>> dataLoader =
environment.getDataLoader("transactionsByAccountIdLoader");
return dataLoader.load(account.id());
}
}
If I use ExecutorInstrumentation as an instrumentation, the properties of Account like id and name gets resolved correctly, but, transactions don't.
I think what's happening is the framework is somehow not dispatching the dataloaders.
I know its a Beta class, but I really wanted to use it so that I can control and tweak the thread pool used by the library.
The text was updated successfully, but these errors were encountered:
Hello, this issue has been inactive for 60 days, so we're marking it as stale. If you would like to continue this discussion, please comment within the next 30 days or we'll close the issue.
Describe the bug
ExecutorInstrumentation doesn't resolve fetchers which invokes a data loader.
To Reproduce
Sample Schema:
If I use
ExecutorInstrumentation
as an instrumentation, the properties ofAccount
likeid
andname
gets resolved correctly, but,transactions
don't.I think what's happening is the framework is somehow not dispatching the dataloaders.
I know its a Beta class, but I really wanted to use it so that I can control and tweak the thread pool used by the library.
The text was updated successfully, but these errors were encountered: