Skip to content

documentation on field visibility describes a deprecated path #2914

@softprops

Description

@softprops

the documentation on field visibility suggests users use

GraphQLSchema schema = GraphQLSchema.newSchema()
        .query(StarWarsSchema.queryType)
        .fieldVisibility(blockedFields)
        .build();

which is deprecated

Screen Shot 2022-08-05 at 6 26 30 PM

I was able to get this working the the replacement with something that looked this

var schema = GraphQLSchema.newSchema()
        .query(StarWarsSchema.queryType)
        .build();
 var limitedSchema = schema
      .transform(schemaBuilder ->
         schemaBuilder.codeRegistry(
           schema.getCodeRegistry()
               .transform(codeRegistryBuilder -> codeRegistryBuilder.fieldVisibility(blockedFields)));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions