11package readme ;
22
3+ import graphql .GraphQLContext ;
4+ import graphql .execution .CoercedVariables ;
35import graphql .language .StringValue ;
6+ import graphql .language .Value ;
47import graphql .schema .Coercing ;
58import graphql .schema .CoercingParseLiteralException ;
69import graphql .schema .CoercingParseValueException ;
710import graphql .schema .CoercingSerializeException ;
811import graphql .schema .GraphQLScalarType ;
12+ import org .jetbrains .annotations .NotNull ;
913
14+ import java .util .Locale ;
1015import java .util .regex .Pattern ;
1116
1217@ SuppressWarnings ("unused" )
@@ -19,17 +24,17 @@ public static class EmailScalar {
1924 .description ("A custom scalar that handles emails" )
2025 .coercing (new Coercing () {
2126 @ Override
22- public Object serialize (Object dataFetcherResult ) {
27+ public Object serialize (@ NotNull Object dataFetcherResult , @ NotNull GraphQLContext graphQLContext , @ NotNull Locale locale ) {
2328 return serializeEmail (dataFetcherResult );
2429 }
2530
2631 @ Override
27- public Object parseValue (Object input ) {
32+ public Object parseValue (@ NotNull Object input , @ NotNull GraphQLContext graphQLContext , @ NotNull Locale locale ) {
2833 return parseEmailFromVariable (input );
2934 }
3035
3136 @ Override
32- public Object parseLiteral (Object input ) {
37+ public Object parseLiteral (@ NotNull Value input , @ NotNull CoercedVariables variables , @ NotNull GraphQLContext graphQLContext , @ NotNull Locale locale ) {
3338 return parseEmailFromAstLiteral (input );
3439 }
3540 })
@@ -73,5 +78,4 @@ private static Object parseEmailFromAstLiteral(Object input) {
7378 }
7479 }
7580
76-
7781}
0 commit comments