Designer 10.7 | webMethods Service Development Help | Working with GraphQL Descriptors | Creating a Dataloader
 
Creating a Dataloader
Use the Service Development perspective in Designer to create a Dataloader.
*To create a Dataloader
1. In the Package Navigator view, open the GraphQL descriptor for which you want to create a Dataloader.
2. Click the Dataloaders tab.
3. Click the Add a Dataloader icon from the toolbar.
4. In the Add a Dataloader dialog box, enter the following details and click OK:
Field
Description
Name
Name of the Dataloader.
Note:
Ensure that the Dataloader name is different from an existing Dataloader or loader service name.
Caching
When selected, enables caching in Dataloader.
Batching
When selected, enables batching in Dataloader.
Max Batch Size
Maximum number of keys in a batch that a Dataloader receives when Integration Server invokes the loader service. The default value is -1. You can set any positive integer value for this property. The value -1 or 0 indicates that there are no restrictions to the batch size.
Output Value Type
Data type of the output field value.
Output Value Dimension Dataloader
Dimension of the output value of Dataloader. You can set any positive integer value for this property.
Example:
0 - Indicates that there is just one value for one key.
1 - Indicates that there is a list of value for one key.
2 - Indicates a two-dimensional array of values for one key.
Designer creates the Dataloader.
5. Click Save.
Designer creates the associated loader service and a document type for keys under the loaders folder in Package Navigator. The loader service name is same as the Dataloader name. The key name is a combination of Dataloader name with the first letter in uppercase and the term Key. For example, the key name for a Dataloader named "testLoader", is TestLoaderKey.
The Properties view displays the Dataloader properties. For more information about the fields in the Properties view, see GraphQL Dataloaders.
Note:
You cannot rename a Dataloader.
You can now use the GraphQL descriptor with Dataloader in a resolver service to fetch data from the data source.