graphql.schema.idl.WiringFactory Java Examples

The following examples show how to use graphql.schema.idl.WiringFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GraphQLExamples.java    From vertx-web with Apache License 2.0 3 votes vote down vote up
public void jsonData() {
  RuntimeWiring.Builder builder = RuntimeWiring.newRuntimeWiring();

  builder.wiringFactory(new WiringFactory() {

    @Override
    public DataFetcher<Object> getDefaultDataFetcher(FieldWiringEnvironment environment) {

      return VertxPropertyDataFetcher.create(environment.getFieldDefinition().getName());

    }
  });
}