Methods
classForType(type) → {Class|GraphModel}
Returns the class for the given GraphQL type.
Parameters:
Name | Type | Description |
---|---|---|
type |
String | The GraphQL type to look up. |
- Source:
Returns:
The class for the given GraphQL type. Defaults to GraphModel if no class is registered for the GraphQL type.
- Type
- Class | GraphModel
registerClassForType(constructor, type)
Registers a class for a GraphQL type in the registry.
Parameters:
Name | Type | Description |
---|---|---|
constructor |
Class | The constructor of the class. |
type |
String | The GraphQL type of the object to deserialize into the class. |
- Source:
unregisterClassForType(type)
Unregisters a class for a GraphQL type in the registry.
Parameters:
Name | Type | Description |
---|---|---|
type |
String | The GraphQL type to unregister. |
- Source: