MCPcopy Index your code
hub / github.com/graphql-java/graphql-java / assertValidName

Method assertValidName

src/main/java/graphql/Assert.java:234–239  ·  view source on GitHub ↗

Validates that the Lexical token name matches the current spec. currently non null, non empty, @param name - the name to be validated. @return the name if valid, or AssertException if invalid.

(@Nullable String name)

Source from the content-addressed store, hash-verified

232 * @return the name if valid, or AssertException if invalid.
233 */
234 public static String assertValidName(@Nullable String name) {
235 if (name != null && isValidName(name)) {
236 return name;
237 }
238 return throwAssert(invalidNameErrorMessage, String.valueOf(name));
239 }
240
241 /**
242 * Fast character-by-character validation without regex.

Callers 15

typeResolverMethod · 0.80
GraphQLScalarTypeMethod · 0.80
GraphQLInterfaceTypeMethod · 0.80
GraphQLArgumentMethod · 0.80
GraphQLEnumTypeMethod · 0.80
GraphQLTypeReferenceMethod · 0.80
GraphQLObjectTypeMethod · 0.80

Calls 2

isValidNameMethod · 0.95
throwAssertMethod · 0.95

Tested by

no test coverage detected