1.0.0 • Published 4 years ago
@parameter1/google-ad-manager-graphql-generator v1.0.0
Google Ad Manager GraphQL Schema Generator
Reads the GAM API WSDL files and generates a corresponding GraphQL schema for a provided API version.
General
- WSDL types that lack child fields will be generated as a definition with a
_: Booleanplaceholder field. This is due to the GraphQL spec requring all definitions to have at least one field. This applies to all generatedType,Interface,Input, andEnumdefinitions. - When building fields for
TypeandInterfacedefinitions, the reference field value is handled as follows:- if explicitly mapped to a scalar value use the mapped value (e.g.
xsd:stringbecomesString) - otherwise, load the
WSDLTypeobject. - if
WSDLType.isEnumerated, reference theEnumname - if
WSDLType.abstract, reference theInterfacename - if the type has child types (via extension), reference the
Interfacename - otherwise, use the
Typename
- if explicitly mapped to a scalar value use the mapped value (e.g.
Enums
- A definition will be an
Enumwhen theWSDLType.enumerationarray field has values.
Interfaces
- A definition will only be an
Interfacewhen theWSDLType.abstractfield is set totrue. - A definition will be an
Interfacewith a correspondingTypewhen the WSDL type is extended by another WSDL type.
Types
- A type will implement an
Interfacewhen theWSDLType.extensionfield has a value set. - Types with the
WSDLType.abstractfield set totruewill never be a concreteTypeand will be generated as anInterface