public ConnectionGraphType()

in src/Epam.GraphQL/Types/ConnectionGraphType.cs [63:100]


        public ConnectionGraphType(IGraphTypeDescriptor<TReturnType, TExecutionContext> graphType)
        {
            // TODO Type name should be the same as an entity type name (e.g. for two loaders for the same entity and field set)
            var typeName = graphType.Name;

            Name = $"{typeName}Connection";
            Description = $"A connection from an object to a list of objects of type `{typeName}`.";

            Field<IntGraphType>()
                .Name("totalCount")
                .Description(
                    "A count of the total number of objects in this connection, ignoring pagination. " +
                    "This allows a client to fetch the first five objects by passing \"5\" as the argument " +
                    "to `first`, then fetch the total count so it could display \"5 of 83\", for example. " +
                    "In cases where we employ infinite scrolling or don't have an exact count of entries, " +
                    "this field will return `null`.");

            Field<NonNullGraphType<PageInfoType>>()
                .Name("pageInfo")
                .Description("Information to aid in pagination.");

            AddField(
                new FieldType
                {
                    Name = "items",
                    Description = ItemsDescription,
                    Type = graphType.Type == null ? null : typeof(ListGraphType<>).MakeGenericType(graphType.Type),
                    ResolvedType = graphType.GraphType == null ? null : new ListGraphType(graphType.GraphType),
                });

            AddField(
                new FieldType
                {
                    Name = "edges",
                    Description = "Information to aid in pagination.",
                    ResolvedType = new ListGraphType(new EdgeGraphType<TReturnType, TExecutionContext>(graphType)),
                });
        }