Software AG Products 10.7 | Integrating On-Premises and Cloud Applications | Service Development | Working with GraphQL Descriptors | Creating a GraphQL Descriptor | How Integration Server Generates Output Signature for Resolver Services
 
How Integration Server Generates Output Signature for Resolver Services
For example, consider the following schema:
Schema:
type Query {
getLink(id: ID): Link
}

type Link {
id: ID
postedBy: User
}

interface User {
id: ID
name: String
}

type ExternalUser implements User{
id: ID
name: String
dept(id: ID): String
}

type InternalUser implements User {
id: ID
name: String
address: Address
}

type HomeAddress {
hAddr: String
}

type OfficeAddress {
oAddr: String
}

union Address = HomeAddress | OfficeAddress
When you import the above schema, then Integration Server generates these resolver services:
Note: 
In version 10.7, the $outputObjectType field is removed from the output of the resolver services and the $typeName field is added to all the Object, Interface, and Union document types. However, the old resolver services that have $outputObjectType will continue to work.
In the above schema,
1. The dept field under the ExternalUser type is of the String type (which is Scalar) so the output signature for deptResolver contains the dept field of the String type .
2. The getLink field under the Query root operation is of the Object type, so the output signature for the getLinkResolver service contains the getLink field referring to the Link document type .
3. The postedBy field under the User type is of the Interface type, so the output signature for the postedByResolver service contains the postedBy field referring to the User document type, and the $typeName field of the String type. The Pick List for the $typeName field contains a list of objects that implement the User interface. In this case, the Pick List contains ExternalUser and InternalUser. During runtime, if the resolver service returns data corresponding to InternalUser, you must select InternalUser for the $typeName field, and if the resolver service returns data corresponding to ExternalUser, you must select ExternalUser for the $typeName field.
If you do not select any value for the $typeName field, then Integration Server throws a runtime error.
4. The address field under the InternalUser type is of the Union type, so the output signature for the addressResolver service contains the address field that refers to the Address document type, and the $typeName field of type String. The Pick List for the $typeName field contains a list of all the member objects for the Union type. In this case, the Pick List contains HomeAddress and OfficeAddress. During runtime, if the resolver service returns data corresponding to HomeAddress, you must select HomeAddress for the $typeName field , and if the resolver service returns data corresponding to OfficeAddress, you must select OfficeAddress for the $typeName field .
If you do not select any value for the $typeName field , Integration Server throws a runtime error.