DevOps Edition for Continuous Integration 10.5 | Service Development Help | Working with GraphQL Descriptors | Creating a GraphQL Descriptor | How Integration Server Generates Input Signature for Resolver Services
 
How Integration Server Generates Input Signature for Resolver Services
The following are the ways that show how Integration Server generates the input signatures for the resolver services.
1. All the root resolver services(resolver services for operations) have only one document args in input signature which contains the fields representing the input argument for that field.
For example, consider the following schema.
Schema:
type Query {
getLink(id: ID): Link
}

type Link {
id: ID
postedBy: User
}

type User {
id: ID
name: String
dept(id: ID): String
}
When you import the above schema, then Integration Server generates the root resolver service (resolver service for Query operation) getLinkResolver, and the input signature contains a document type field args with field id. This field represents the input argument id for the field getLink in operation type Query.
2. All the resolver services for all other types(except operations) have two document types parent and args in the input signature. The parent document contains the Object returned from the parent resolver and the args document contains the fields representing the input arguments for that field.
For the above schema in step1, the deptResolver service has input signature as shown below:
Here, the parent of dept field is User, so the parent document contains the fields from the User document type and the field dept accepts an argument id, so the args document type contains a field id.

Copyright © 2017-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.