コード例 #1
0
        /// <summary>
        /// Creates a GraphQL type from <typeparamref name="TSourceType"/>.
        /// </summary>
        public AutoObjectGraphType()
        {
            GraphTypeHelper.ConfigureGraph <TSourceType>(this, GetDefaultName);

            //check if there is a default concurrency setting
            var concurrentAttribute = typeof(TSourceType).GetCustomAttribute <ConcurrentAttribute>();

            if (concurrentAttribute != null)
            {
                DefaultConcurrent  = true;
                DefaultCreateScope = concurrentAttribute.CreateNewScope;
            }

            GraphTypeHelper.AddFields(this, CreateFieldTypeList());
        }
コード例 #2
0
        /// <summary>
        /// Creates a GraphQL type from <typeparamref name="TSourceType"/>.
        /// </summary>
        public AutoInputObjectGraphType()
        {
            GraphTypeHelper.ConfigureGraph <TSourceType>(this, GetDefaultName);

            GraphTypeHelper.AddFields(this, CreateFieldTypeList());
        }