Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
521e544
wip of introducing two new coercing functions
andimarek May 9, 2021
557743c
wip
andimarek May 10, 2021
8700c3a
wip
andimarek May 11, 2021
72446c5
wip
andimarek May 11, 2021
06edc42
wip
andimarek May 11, 2021
ff68ce6
wip
andimarek May 11, 2021
8465df0
wip
andimarek May 11, 2021
b6a0d5f
wip
andimarek May 11, 2021
95f72a1
wip
andimarek May 11, 2021
0f7f272
wip
andimarek May 11, 2021
3a98816
rename value/defaultValue methods
andimarek May 11, 2021
22dcc6a
remove non standard Scalars
andimarek May 12, 2021
eedde80
tests
andimarek May 12, 2021
ea1495c
fix
andimarek May 12, 2021
60408c3
clarify validation
andimarek May 12, 2021
7eb36aa
wip of introducing two new coercing functions
andimarek May 9, 2021
03f956c
wip
andimarek May 10, 2021
df5edaf
wip
andimarek May 11, 2021
537ea84
wip
andimarek May 11, 2021
62c4fdb
wip
andimarek May 11, 2021
945ed09
wip
andimarek May 11, 2021
6e21e02
wip
andimarek May 11, 2021
9ee7e94
wip
andimarek May 11, 2021
ebc39ca
wip
andimarek May 11, 2021
9ebab6d
wip
andimarek May 11, 2021
aa9f162
rename value/defaultValue methods
andimarek May 11, 2021
9658168
remove non standard Scalars
andimarek May 12, 2021
ef9d9c2
tests
andimarek May 12, 2021
80ab31b
fix
andimarek May 12, 2021
ae664c0
clarify validation
andimarek May 12, 2021
998d8a4
Merge remote-tracking branch 'origin/literal-to-value-coercing' into …
andimarek May 12, 2021
30f9c3e
validation work
andimarek May 12, 2021
54025ed
add validation of default values
andimarek May 13, 2021
86b2e23
cleanup
andimarek May 13, 2021
549d797
javadoc
andimarek May 16, 2021
77512e1
javadoc
andimarek May 16, 2021
c4a05f1
validate programmatic applied directive values
andimarek May 21, 2021
5d3d775
applied directive values are validated
andimarek May 21, 2021
7b684e7
refactor to use InputValueWithState instead of just Enum + Object
andimarek May 21, 2021
c0e83b7
fix tests
andimarek May 21, 2021
1797510
Merge branch 'master' into literal-to-value-coercing
andimarek May 23, 2021
a72796d
PR feedback
andimarek May 24, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 0 additions & 63 deletions src/main/java/graphql/Scalars.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
package graphql;


import graphql.scalar.GraphqlBigDecimalCoercing;
import graphql.scalar.GraphqlBigIntegerCoercing;
import graphql.scalar.GraphqlBooleanCoercing;
import graphql.scalar.GraphqlByteCoercing;
import graphql.scalar.GraphqlCharCoercing;
import graphql.scalar.GraphqlFloatCoercing;
import graphql.scalar.GraphqlIDCoercing;
import graphql.scalar.GraphqlIntCoercing;
import graphql.scalar.GraphqlLongCoercing;
import graphql.scalar.GraphqlShortCoercing;
import graphql.scalar.GraphqlStringCoercing;
import graphql.schema.GraphQLScalarType;

Expand Down Expand Up @@ -61,61 +55,4 @@ public class Scalars {
*/
public static final GraphQLScalarType GraphQLID = GraphQLScalarType.newScalar()
.name("ID").description("Built-in ID").coercing(new GraphqlIDCoercing()).build();

/**
* This represents the "Long" type which is a representation of java.lang.Long
*
* @deprecated The is a non standard scalar and is difficult for clients (such as browser and mobile code) to cope with
* the exact semantics. These will be removed in the future version and moved to another library.
*/
public static final GraphQLScalarType GraphQLLong = GraphQLScalarType.newScalar()
.name("Long").description("Long type").coercing(new GraphqlLongCoercing()).build();

/**
* This represents the "Short" type which is a representation of java.lang.Short
*
* @deprecated The is a non standard scalar and is difficult for clients (such as browser and mobile code) to cope with
* the exact semantics. These will be removed in the future version and moved to another library.
*/
public static final GraphQLScalarType GraphQLShort = GraphQLScalarType.newScalar()
.name("Short").description("Built-in Short as Int").coercing(new GraphqlShortCoercing()).build();

/**
* This represents the "Byte" type which is a representation of java.lang.Byte
*
* @deprecated The is a non standard scalar and is difficult for clients (such as browser and mobile code) to cope with
* the exact semantics. These will be removed in the future version and moved to another library.
*/
public static final GraphQLScalarType GraphQLByte = GraphQLScalarType.newScalar()
.name("Byte").description("Built-in Byte as Int").coercing(new GraphqlByteCoercing()).build();


/**
* This represents the "BigInteger" type which is a representation of java.math.BigInteger
*
* @deprecated The is a non standard scalar and is difficult for clients (such as browser and mobile code) to cope with
* the exact semantics. These will be removed in the future version and moved to another library.
*/
public static final GraphQLScalarType GraphQLBigInteger = GraphQLScalarType.newScalar()
.name("BigInteger").description("Built-in java.math.BigInteger").coercing(new GraphqlBigIntegerCoercing()).build();

/**
* This represents the "BigDecimal" type which is a representation of java.math.BigDecimal
*
* @deprecated The is a non standard scalar and is difficult for clients (such as browser and mobile code) to cope with
* the exact semantics. These will be removed in the future version and moved to another library.
*/
public static final GraphQLScalarType GraphQLBigDecimal = GraphQLScalarType.newScalar()
.name("BigDecimal").description("Built-in java.math.BigDecimal").coercing(new GraphqlBigDecimalCoercing()).build();


/**
* This represents the "Char" type which is a representation of java.lang.Character
*
* @deprecated The is a non standard scalar and is difficult for clients (such as browser and mobile code) to cope with
* the exact semantics. These will be removed in the future version and moved to another library.
*/
public static final GraphQLScalarType GraphQLChar = GraphQLScalarType.newScalar()
.name("Char").description("Built-in Char as Character").coercing(new GraphqlCharCoercing()).build();

}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ public NonNullableValueCoercedAsNullException(VariableDefinition variableDefinit
this.path = path;
}

public NonNullableValueCoercedAsNullException(String fieldName, List<Object> path, GraphQLType graphQLType) {
super(format("Field '%s' has coerced Null value for NonNull type '%s'",
fieldName, GraphQLTypeUtil.simplePrint(graphQLType)));
this.path = path;
}

public NonNullableValueCoercedAsNullException(GraphQLInputObjectField inputTypeField) {
super(format("Input field '%s' has coerced Null value for NonNull type '%s'",
inputTypeField.getName(), GraphQLTypeUtil.simplePrint(inputTypeField.getType())));
Expand Down
Loading