public static function mutationWithClientMutationId(array $config)
    {
        $name = self::getArrayValue($config, 'name');
        $inputFields = self::getArrayValue($config, 'inputFields');
        $outputFields = self::getArrayValue($config, 'outputFields');
        $mutateAndGetPayload = self::getArrayValue($config, 'mutateAndGetPayload');

        $augmentedInputFields = function() use ($inputFields) {
            $inputFieldsResolved = self::resolveMaybeThunk($inputFields);
            return array_merge($inputFieldsResolved !== null ? $inputFieldsResolved : [], [
                'clientMutationId' => [
                    'type' => Type::string()
                ]
            ]);
        };

        $augmentedOutputFields = function () use ($outputFields) {
            $outputFieldsResolved = self::resolveMaybeThunk($outputFields);
            return array_merge($outputFieldsResolved !== null ? $outputFieldsResolved : [], [
                'clientMutationId' => [
                    'type' => Type::string()
                ]
            ]);
        };

        $outputType = new ObjectType([
            'name' => $name . 'Payload',
            'fields' => $augmentedOutputFields
        ]);

        $inputType = new InputObjectType([
            'name' => $name . 'Input',
            'fields' => $augmentedInputFields
        ]);

        $definition = [
            'type' => $outputType,
            'args' => [
                'input' => [
                    'type' => Type::nonNull($inputType)
                ]
            ],
            'resolve' => function ($query, $args, $context, ResolveInfo $info) use ($mutateAndGetPayload) {
                $payload = call_user_func($mutateAndGetPayload, $args['input'], $context, $info);
                $payload['clientMutationId'] = isset($args['input']['clientMutationId']) ? $args['input']['clientMutationId'] : null;
                return $payload;
            }
        ];
	    if (array_key_exists('description', $config)){
		    $definition['description'] = $config['description'];
	    }
	    if (array_key_exists('deprecationReason', $config)){
		    $definition['deprecationReason'] = $config['deprecationReason'];
	    }
        return $definition;
    }