Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/main/java/graphql/schema/SingletonPropertyDataFetcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@ public class SingletonPropertyDataFetcher<T> implements LightDataFetcher<T> {

private static final SingletonPropertyDataFetcher<Object> SINGLETON_FETCHER = new SingletonPropertyDataFetcher<>();

private static final DataFetcherFactory<?> SINGLETON_FETCHER_FACTORY = environment -> SINGLETON_FETCHER;
private static final DataFetcherFactory<?> SINGLETON_FETCHER_FACTORY = new DataFetcherFactory<Object>() {
@SuppressWarnings("deprecation")
@Override
public DataFetcher<Object> get(DataFetcherFactoryEnvironment environment) {
return SINGLETON_FETCHER;
}

@Override
public DataFetcher<Object> get(GraphQLFieldDefinition fieldDefinition) {
return SINGLETON_FETCHER;
}
};

/**
* This returns the same singleton {@link LightDataFetcher} that fetches property values
Expand Down
Loading