Esempio n. 1
0
        protected TypeSyntax GetCSharpTypeFromGraphQLNonNullType(GraphQLNonNullType type, IEnumerable <ASTNode> allDefinitions)
        {
            switch (type.Type.Kind)
            {
            case ASTNodeKind.NamedType: return(this.GetCSharpTypeFromGraphQLNamedType((GraphQLNamedType)type.Type, allDefinitions, false));

            case ASTNodeKind.ListType: return(this.GetCSharpTypeFromGraphQLListType((GraphQLListType)type.Type, allDefinitions));
            }

            throw new NotImplementedException($"GetCSharpTypeFromGraphQLNonNullType: Unknown type.Kind: {type.Type.Kind}");
        }
Esempio n. 2
0
        private string PrintNonNullType(GraphQLNonNullType node)
        {
            var type = Print(node.Type);

            return($"{type}!");
        }
Esempio n. 3
0
 private IntrospectedType IntrospectNonNullType(GraphQLNonNullType type, Func <IntrospectedType> innerType)
 {
     return(IntrospectedType.CreateForNonNull(innerType()));
 }