public static IInputFieldDescriptor ID(
            this IInputFieldDescriptor descriptor,
            NameString typeName = default)
        {
            if (descriptor is null)
            {
                throw new ArgumentNullException(nameof(descriptor));
            }

            descriptor.Extend().OnBeforeCreate(RewriteInputFieldType);
            descriptor.Extend().OnBeforeCompletion(
                (c, d) => AddSerializerToInputField(c, d, typeName));

            return(descriptor);
        }
        private static void DeclareFields(
            ITypeBindingInfo bindingInfo,
            IInputObjectTypeDescriptor typeDescriptor,
            InputObjectTypeDefinitionNode node)
        {
            foreach (InputValueDefinitionNode inputField in node.Fields)
            {
                bindingInfo.TrackField(inputField.Name.Value);

                IInputFieldDescriptor descriptor = typeDescriptor
                                                   .Field(inputField.Name.Value)
                                                   .Description(inputField.Description?.Value)
                                                   .Type(inputField.Type)
                                                   .DefaultValue(inputField.DefaultValue)
                                                   .SyntaxNode(inputField);

                if (bindingInfo.TryGetFieldProperty(
                        inputField.Name.Value,
                        MemberKind.InputObjectField,
                        out PropertyInfo p))
                {
                    descriptor.Extend().OnBeforeCreate(
                        t => t.Property = p);
                }

                foreach (DirectiveNode directive in inputField.Directives)
                {
                    descriptor.Directive(directive);
                }
            }
        }