Repository navigation
SFDX package name and version: gql-apex-client@2.1.0.0
Package Id: 04t7R000001dcReQAI
Breaking changes
asEnum() method is deleted for GraphQLArgument and GraphQLVariable classes
That was done because these methods are not needed anymore with introduction of the new GraphQLEnum class, which can be used for passing enum values into arguments and variable default values.
Example:
{
countryByCode(code: CODE_NL) {
name
}
}Apex equivalent:
GraphQLField countryByCode = new GraphQLField('countryByCode')
.withField('name')
.withArgument('code', new GraphQLEnum('CODE_NL'));
GraphQLQuery query = new GraphQLQuery(countryByCode);
System.debug(query.build(true));