GraphQL

Interfaces & Types

Social Feeds adds interfaces to Craft’s GraphQL schema for its feeds, sources and posts. Queries shows how to request them through the socialFeeds query. All fields are nullable.

Interfaces

The SocialFeedsInterface Interface

The socialFeeds query returns this interface, which holds the plugin’s queries. Select feeds, feed, sources or source inside it, as described in Queries.

The FeedInterface Interface

A feed, returned by the feeds and feed queries.

id

The ID of the feed.

uid

The unique identifier of the feed.

name

The name of the feed.

handle

The handle of the feed.

enabled

Whether the feed is enabled.

sources

The feed’s sources. This field takes the same arguments as the sources query.

The SourceInterface Interface

A source, returned by the sources and source queries and a feed’s sources field.

id

The ID of the source.

uid

The unique identifier of the source.

name

The name of the source.

handle

The handle of the source.

enabled

Whether the source is enabled.

dateLastFetch

The date the source last fetched posts from its provider, or null when it hasn’t fetched yet.

providerName

The display name of the source’s provider, such as YouTube.

providerHandle

The handle of the source’s provider, such as youTube.

primaryColor

The provider’s brand colour as a hex value.

icon

The provider’s icon as SVG markup.

isConnected

Whether the source is connected to its provider with a saved access token.

posts

The source’s posts, newest first. This field takes limit and offset arguments, described in Query Posts.

The PostInterface Interface

A post, returned by a source’s posts field.

posts(limit: 1) {
  text
  postType
  tags
  links {
    title
    url
  }
  videos {
    url
  }
}
{
  "posts": [
    {
      "text": "Our new range is out now.",
      "postType": "video",
      "tags": "[\"launch\",\"summer\"]",
      "links": [],
      "videos": [
        { "url": "https://example.com/video.mp4" }
      ]
    }
  ]
}

id

The post’s ID on the provider.

uid

The provider’s unique identifier for the post item.

title

The post’s title, for providers that give posts one, such as YouTube. This is null for most posts.

text

The post’s main text or description.

url

The URL of the post on the provider’s site.

sourceId

The ID of the source the post was fetched from.

sourceHandle

The handle of the source the post was fetched from.

sourceType

The handle of the source’s provider, such as instagram.

postType

The kind of post, for providers that classify them, such as image, video or event.

likes

The number of likes the post has, or null when the provider doesn’t report it.

shares

The number of shares the post has, or null when the provider doesn’t report it.

replies

The number of replies or comments the post has, or null when the provider doesn’t report it.

dateCreated

The date the post was published on the provider.

dateUpdated

The date the post was last updated on the provider, when the provider reports it.

author

The author who published the post, or null when the provider doesn’t supply one.

tags

A JSON string of the post’s tags or hashtags, such as ["summer","sale"].

The links attached to the post.

images

The images attached to the post.

videos

The videos attached to the post.

data

A JSON string of the full response for the post from the provider’s API, with access tokens and other secrets removed.

meta

A JSON string of any extra provider-specific values kept alongside the post.

The PostAuthorInterface Interface

The author of a post, returned by a post’s author field.

id

The author’s ID on the provider.

username

The author’s username on the provider, for providers that have one.

name

The author’s display name.

url

The URL of the author’s profile on the provider.

photo

The URL of the author’s profile photo.

The PostLinkInterface Interface

A link attached to a post, returned by a post’s links field.

id

The link’s ID on the provider, when it has one.

title

The link’s title, when the provider supplies one.

url

The URL the link points to.

The PostMediaInterface Interface

An image or video attached to a post, returned by a post’s images and videos fields.

id

The media item’s ID on the provider.

title

The media item’s title or alternative text, when the provider supplies one.

type

The kind of media item, either image or video.

url

The URL of the image or video file.

width

The width of the media item in pixels, when the provider reports it.

height

The height of the media item in pixels, when the provider reports it.

Last updated: Nov 13, 2026, 3:11:25 PM