Ejemplo n.º 1
0
        private GraphTypesLookup CreateTypesLookup()
        {
            var resolvedTypes = _additionalTypes.Select(ResolveType).ToList();

            var types = new List <GraphType>
            {
                Query,
                Mutation
            }
            .Concat(resolvedTypes)
            .Where(x => x != null)
            .ToList();

            return(GraphTypesLookup.Create(types, ResolveType));
        }
Ejemplo n.º 2
0
        private GraphTypesLookup CreateTypesLookup()
        {
            var resolvedTypes = _additionalTypes.Select(t => ResolveType(t.GetNamedType())).ToList();

            var types = _additionalInstances.Concat(
                new IGraphType[]
            {
                Query,
                Mutation,
                Subscription
            })
                        .Concat(resolvedTypes)
                        .Where(x => x != null)
                        .ToList();

            return(GraphTypesLookup.Create(types, _directives, ResolveType));
        }
Ejemplo n.º 3
0
 private GraphTypesLookup CreateTypesLookup()
 {
     return(GraphTypesLookup.Create(new[] { Query, Mutation }, ResolveType));
 }