Common GraphQL Interfaces

Last updated on June 18, 2024.

An Interface is an abstract GraphQL type that includes a particular set of fields that a type (or object) must include to implement that interface. An interface helps maintain a clean schema whenever certain types have identical fields. Your program can always query these common fields no matter what type is returned.

Use this article to guide you in using common GraphQL interfaces in Insites.

AdminNonDeployableSharedAttributesInterface

Code example:

Fields

AdminPropertiesInterface

Code example:

Fields

Deprecated; use instead.

List of property attributes to be included in the results.

AdminSharedAttributesInterface

Code example:

Fields

Defines the physical path of the file.

BasicPropertyInterface

Code example:

Fields

The ID of an object.

List of all properties assigned to the object.

Fetch any property by name and return value as a String; ex: .

Fetch any property by name and return the value as an of strings. ex: .

Fetch any property by name and return value as a Boolean; ex: .

Fetch any property by name and return value as a Float; ex: .

Fetch any property by name and return value as an Integer; ex: .

Fetch any property by name and return the value as a JSON string.

Fetch any property by name, parse it as a JSON, and then return the object.

HasModelsInterface

Code example:

Fields

Defines has-one relation with other model, e.g: .

Load resources with .

Load resources with .

Joins model [formaly customization] with .

Defines has-many relation with other model; ex: .

Load resources with .

Load resources with .

Joins model [formaly customization] with .

Defines has-one relation with other model; ex:

Load resources with .

Load resources with .

Joins model [formaly customization] with .

Defines has-many relation with other model; ex: .

Load resources with .

Load resources with .

Joins model [formaly customization] with .

Defines relation with other user; ex: .

Load resources with .

Defines has-many relation with other user; ex: .

Load resources with .

Load resources with .

Defines relation with other user; ex: .

Load resources with .

Defines has-many relation with other user; ex: .

Load resources with .

Load resources with .

HasRecordsInterface

Code example:

Fields

Defines has-one relation with other record; ex: .

Load resources with .

Load resources with .

Joins record [formaly customization] with .

Defines has-many relation with other records; ex: .

Load resources with .

Load resources with .

Define the table name which should be used as a source for related records.

HasUsersInterface

Code example:

Fields

Defines relation with other user; ex: .

Load resources with .

Defines has-many relation with other user; ex: .

Load resources with .

Load resources with .

LegacyCustomAttributeInterface

Code example:

Fields

Fetch address by name; ex: .

Fetch all addresses, optionaly you can filter results by name; ex: home: custom_addresses(name: "home").

Fetch attachment by name; ex: .

Fetch all attachments; optionally you can filter results by name; ex: .

Fetch image by name; ex: header: custom_image(name: "header").

Fetch all images, optionally you can filter results by name; ex: .

ListingCustomAttributeInterface

Code example:

Fields

Fetch address by name; ex: .

Fetch all addresses; optionally you can filter results by name; ex: .

Fetch attachment by name; ex: .

Fetch image by name; ex: .

Fetch all images, optionaly you can filter results by name; ex: .

List of all properties assigned to the object.

Fetch any custom attribute by name; ex: .

Fetch any property of type by name, it returns in contrast to "property" which returns ; ex: .

Fetch any property of type by name, it returns in contrast to "property" which returns ; ex: .

ListingsMetadata

Code example:

Fields

The field contains the distance to the target location when sorting by distance.

PropertiesInterface

Code example:

Fields

Fetch address by name; ex: .

  • name (String)

Fetch all addresses; optionally you can filter results by name; ex: .

Fetch attachment by name; ex: .

Fetch all attachments, optionally you can filter results by name; ex: .

The ID of an object.

Fetch image by name; ex: .

Fetch all images, optionally you can filter results by name; ex: .

List of all properties assigned to the object.

Fetch any property by name and return the value as a ; ex: .

Fetch any property by name and return the value as an of strings. ex: .

Fetch any property by name and return value as a ; ex: .

Fetch any property by name and return value as a ; ex: .

Fetch any property by name and return value as an ; ex: .

Fetch any property by name and return the value as a string.

Fetch any property by name, parse it as a and return the object.

Fetch any property by name and returns upload details.

Defines the number of seconds for which the generated URL will be accessible. Specifies the number of seconds for which the generated URL will be accessible. It must be set if a user sets to private.

RelationOnDemandInterface

Code example:

Fields

Defines relation with other model; ex: .

Load resources with .

Load remote resource with .

Joins model [formaly customization] with .

Defines relation with other model; ex: .

Load resources with .

Load resources with .

Joins model [formaly customization] with .

Defines relation with other model; ex: .

Load resources with .

Load remote resource with .

Joins model [formaly customization] with .

Defines has-many relation with other model, returns maximum of 10000 records at once; ex: .

Load resources with .

Load resources with .

Joins model [formaly customization] with .

Defines relation with other user, returns maximum of 10000 records at once; ex: .

Defines relation with other user; ex: .

RemoteModelInterface

Code example:

Fields

Defines a relation object accessible over HTTP in a JSON collection. The object is identified by its ID.

An endpoint that will return resources for given IDs in JSON format.

Load remote resource with .

RemoteRecordsInterface

Code example:

Fields

Defines a relation object accessible over HTTP in a JSON collection. The object is identified by its ID.

An endpoint that will return resources for given IDs in JSON format.

Load remote resource with .

RemoteUsersInterface

Code example:

Fields

Defines a relation object accessible over HTTP in a JSON collection. The object is identified by its ID.

An endpoint that will return resources for given ids in JSON format.

Load remote resource with .

Reference

You may visit the following resources for more information:

Have a suggestion for this page?

Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.