@PublicApi public class SchemaUsage extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Integer> |
getArgumentReferenceCounts()
This shows how many times a type is referenced by an argument.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getDirectiveReferenceCounts()
This shows how many times a directive is applied on some other schema element.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getFieldReferenceCounts()
This shows how many times a type is referenced by either an input or output field.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getInputFieldReferenceCounts()
This shows how many times a type is referenced by an input field.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getInterfaceReferenceCounts()
This shows how many times an interface type is referenced as a member in some other
object or interface type.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getOutputFieldReferenceCounts()
This shows how many times a type is referenced by an output field.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getUnionReferenceCounts()
This shows how many times an object type is referenced as a member in some other
union type.
|
java.util.Set<GraphQLNamedSchemaElement> |
getUnReferencedElements(GraphQLSchema schema)
This returns all the unreferenced named elements in a schema.
|
boolean |
isStronglyReferenced(GraphQLSchema schema,
java.lang.String elementName)
Returns true if the named element is strongly reference somewhere in the schema back to the root types such as the schema
query, mutation or subscription types.
|
public java.util.Map<java.lang.String,java.lang.Integer> getFieldReferenceCounts()
public java.util.Map<java.lang.String,java.lang.Integer> getOutputFieldReferenceCounts()
public java.util.Map<java.lang.String,java.lang.Integer> getInputFieldReferenceCounts()
public java.util.Map<java.lang.String,java.lang.Integer> getArgumentReferenceCounts()
public java.util.Map<java.lang.String,java.lang.Integer> getInterfaceReferenceCounts()
public java.util.Map<java.lang.String,java.lang.Integer> getUnionReferenceCounts()
public java.util.Map<java.lang.String,java.lang.Integer> getDirectiveReferenceCounts()
public boolean isStronglyReferenced(GraphQLSchema schema, java.lang.String elementName)
schema
- the schema that contains the name typeelementName
- the element name to checkpublic java.util.Set<GraphQLNamedSchemaElement> getUnReferencedElements(GraphQLSchema schema)
schema
- the schema to checkisStronglyReferenced(GraphQLSchema, String)
returns false