Create Google Drive Feed

Create Google Drive feed to ingest files.

Graphlit supports ingesting files from Google Drive.

The createFeed mutation enables the creation of a feed by accepting the feed name, type and site feed parameters and it returns essential details, including the ID, name, state, and type of the newly generated feed.

Graphlit requires specific feed parameters including the Google OAuth clientId, clientSecret and refreshToken and optional folderId.

Mutation:

mutation CreateFeed($feed: FeedInput!) {
  createFeed(feed: $feed) {
    id
    name
    state
    type
  }
}

Variables:

{
  "feed": {
    "type": "SITE",
    "site": {
      "type": "GOOGLE_DRIVE",
      "isRecursive": true,
      "googleDrive": {
        "folderId": "redacted",
        "refreshToken": "redacted",
        "clientId": "redacted",
        "clientSecret": "redacted"
      }
    },
    "name": "Google Drive Feed"
  }
}

Response:

{
  "type": "SITE",
  "id": "59be7878-0ec1-4764-ae1a-ea180b5a05d3",
  "name": "Google Drive Feed",
  "state": "ENABLED"
}

User Authentication

When using User authentication, you will need to authenticate your end-user via OAuth 2.0 and receive a refresh token for the end-user. Graphlit will use the refresh token to authenticate and enumerate files on Google Drive on your user's behalf.

More information on creating a Google OAuth client ID can be found here and here.

Last updated