Ejemplo n.º 1
0
 public ISchemaBuilder SetOptions(IReadOnlySchemaOptions options)
 {
     if (options != null)
     {
         _options = SchemaOptions.FromOptions(options);
     }
     return(this);
 }
Ejemplo n.º 2
0
        public void Copy_Options_Defaults()
        {
            // arrange
            var options = new SchemaOptions();

            // act
            var copied = new ReadOnlySchemaOptions(options);

            // assert
            copied.MatchSnapshot();
        }
        public void Copy_Options()
        {
            // arrange
            var options = new SchemaOptions
            {
                QueryTypeName          = "A",
                MutationTypeName       = "B",
                SubscriptionTypeName   = "C",
                StrictValidation       = false,
                UseXmlDocumentation    = false,
                DefaultBindingBehavior = BindingBehavior.Explicit,
                FieldMiddleware        = FieldMiddlewareApplication.AllFields
            };

            // act
            var copied = new ReadOnlySchemaOptions(options);

            // assert
            copied.MatchSnapshot();
        }