graphql#GraphQLInterfaceTypeConfig TypeScript Examples
The following examples show how to use
graphql#GraphQLInterfaceTypeConfig.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: schema-resolver.ts From graphql-mesh with MIT License | 6 votes |
private createInterfaceTypeConfig(soapType: SoapObjectType): GraphQLInterfaceTypeConfig<any, any> {
const fields = (): GraphQLFieldConfigMap<any, any> => {
const fieldMap: GraphQLFieldConfigMap<any, any> = {};
this.appendInterfaceTypeFields(fieldMap, soapType);
return fieldMap;
};
return {
name: this.options.interfaceNameResolver(soapType),
fields,
// should never be called, since the schema will not contain ambigous return types
resolveType: (value: any, context: any, info: GraphQLResolveInfo) => {
throw Error('no interface resolving available');
},
};
}