public static ISchemaBuilder AddQueryFieldToMutationPayloads(this ISchemaBuilder schemaBuilder, Action <MutationPayloadOptions>?configureOptions = null) { MutationPayloadOptions options = new(); configureOptions?.Invoke(options); return(schemaBuilder.AddQueryFieldToMutationPayloads(options)); }
public static ISchemaBuilder EnableRelaySupport( this ISchemaBuilder schemaBuilder, RelayOptions?options = null) { options ??= new(); if (options.AddQueryFieldToMutationPayloads) { MutationPayloadOptions payloadOptions = new() { QueryFieldName = options.QueryFieldName, MutationPayloadPredicate = options.MutationPayloadPredicate }; schemaBuilder.AddQueryFieldToMutationPayloads(payloadOptions); } return(schemaBuilder .SetContextData(IsRelaySupportEnabled, 1) .AddGlobalObjectIdentification()); }