Java Code Examples for graphql.schema.GraphQLArgument#getType()
The following examples show how to use
graphql.schema.GraphQLArgument#getType() .
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: DefaultValueSchemaTransformer.java From graphql-spqr-spring-boot-starter with Apache License 2.0 | 5 votes |
@Override default GraphQLArgument transformArgument(GraphQLArgument argument, OperationArgument operationArgument, OperationMapper operationMapper, BuildContext buildContext) { if (supports(operationArgument.getJavaType()) && !(argument.getType() instanceof GraphQLNonNull) && argument.getDefaultValue() == null) { return argument.transform(builder -> builder.defaultValue(getDefaultValue())); } return argument; }
Example 2
Source File: GraphQLDocumentationProvider.java From js-graphql-intellij-plugin with MIT License | 5 votes |
@NotNull private String getArgumentDocumentation(String inputValueName, GraphQLArgument argument) { final StringBuilder html = new StringBuilder().append(DEFINITION_START); GraphQLInputType argumentType = argument.getType(); html.append(inputValueName).append(argumentType != null ? ": " : " ").append(argumentType != null ? GraphQLUtil.getName(argumentType) : ""); html.append(DEFINITION_END); appendDescription(html, GraphQLDocumentationMarkdownRenderer.getDescriptionAsHTML(argument.getDescription())); return html.toString(); }