コード例 #1
0
 public GraphQLQuery(GraphQLOperationType operationType, IEnumerable <GraphQLField> selectionSet, GraphQLQueryArgument[] arguments, string url, HttpMethod httpMethod, Func <GraphQLField, bool> filter, string authorizationToken, string authorizationMethod, IDictionary <string, string> headers, IGraphQLQueryGeneratorFromFields queryGenerator, IGraphQLHttpExecutor executor, IGraphQLDeserialization deserilization)
 {
     this._url                 = url ?? throw new ArgumentNullException(nameof(url));
     this._httpMethod          = httpMethod;
     this._executor            = executor ?? throw new ArgumentNullException(nameof(executor));
     this._deserilization      = deserilization;
     this._authorizationMethod = authorizationMethod;
     this._queryGenerator      = queryGenerator;
     this._authorizationToken  = authorizationToken;
     this.OperationType        = operationType;
     this.SelectionSet         = selectionSet;
     this._arguments           = arguments;
     this._headers             = headers;
     this._filter              = filter;
 }
コード例 #2
0
 /// <summary>
 /// Initilizes a new instance of GraphQL client which supports generating GraphQL queries and mutations from a <see cref="Type"/>
 /// </summary>
 /// <param name="executor">The <see cref="IGraphQLHttpExecutor"/> to use for the GraphQL client</param>
 /// <param name="fieldBuilder">The <see cref="IGraphQLFieldBuilder"/> used for generating the fields used for generating the query</param>
 /// <param name="queryGenerator">The <see cref="IGraphQLQueryGeneratorFromFields"/> used for the GraphQL client</param>
 public GraphQLHttpClient(IGraphQLHttpExecutor executor, IGraphQLFieldBuilder fieldBuilder, IGraphQLQueryGeneratorFromFields queryGenerator)
 {
     _executor       = executor ?? throw new ArgumentNullException(nameof(executor));
     _fieldBuilder   = fieldBuilder ?? throw new ArgumentNullException(nameof(fieldBuilder));
     _queryGenerator = queryGenerator ?? throw new ArgumentNullException(nameof(queryGenerator));
 }
コード例 #3
0
 public GraphQLQuery(GraphQLOperationType operationType, IEnumerable <GraphQLField> selectionSet, GraphQLQueryArgument[] arguments, string url, HttpMethod httpMethod, string authorizationToken, string authorizationMethod, IDictionary <string, string> headers, IGraphQLQueryGeneratorFromFields queryGenerator, IGraphQLHttpExecutor executor, IGraphQLDeserialization deserilization)
     : this(operationType : operationType,
            selectionSet : selectionSet,
            arguments : arguments,
            url : url,
            httpMethod : httpMethod,
            filter : null,
            authorizationToken : authorizationToken,
            authorizationMethod : authorizationMethod,
            headers : headers,
            queryGenerator : queryGenerator,
            executor : executor,
            deserilization : deserilization)
 {
 }