Example #1
0
 public Task <string> GetWithDataLoader(
     string key,
     FieldNode fieldSelection,
     [DataLoader] TestDataLoader testDataLoader)
 {
     return(testDataLoader.LoadAsync(key));
 }
Example #2
0
 public Task <string> GetWithDataLoader(
     string key,
     FieldNode fieldSelection,
     [DataLoader] TestDataLoader testDataLoader,
     CancellationToken cancellationToken)
 {
     return(testDataLoader.LoadAsync(key, cancellationToken));
 }
Example #3
0
        public List <string> GetLoads([DataLoader] TestDataLoader testDataLoader)
        {
            List <string> list = new List <string>();

            foreach (IReadOnlyList <string> request in testDataLoader.Loads)
            {
                list.Add(string.Join(", ", request));
            }

            return(list);
        }
Example #4
0
        public List<string> GetLoads2(
            [DataLoader("fooBar")]TestDataLoader testDataLoader)
        {
            var list = new List<string>();

            foreach (IReadOnlyList<string> request in testDataLoader.Loads)
            {
                list.Add(string.Join(", ", request));
            }

            return list;
        }
Example #5
0
        public async Task<string> GetWithStackedDataLoader(
            string key,
            FieldNode fieldSelection,
            [DataLoader("fooBar")]TestDataLoader testDataLoader,
            CancellationToken cancellationToken)
        {

            string s = await testDataLoader.LoadAsync(key + "a", cancellationToken);
            s += await testDataLoader.LoadAsync(key + "b", cancellationToken);
            s += await testDataLoader.LoadAsync(key + "c", cancellationToken);
            s += await testDataLoader.LoadAsync(key + "d", cancellationToken);
            s += await testDataLoader.LoadAsync(key + "e", cancellationToken);
            return s;
        }