sync_feature_sets

Retrieve a list of feature sets that have changed.

Arguments

content_hashes ([String!]!)

An array of content hashes for feature sets the client has previously retrieved. The server will return feature sets whose content hashes do not match the client's content hashes.

owners ([FeatureSetOwnerInput!]!)

An array of owners to which the feature sets belong.

Return fields

deleted ([SyncItem!]!)

Items that have been deleted.

failed ([SyncError!])

A list describing errors that occurred during the syncing process.

remaining_count (Int!)

The number of items remaining to be synced.

upserted ([SyncItem!]!)

Items that have been inserted or updated.

Examples

Sync feature sets for feature set owners

This query is used by a client to sync feature sets for multiple feature set owners. This query will return up to the first 2,000 feature sets that are different from the feature sets held by the client. To retrieve the remaining feature sets, the client should call the query repeatedly, passing in the full set of content hashes for the feature sets it holds, until no more feature sets are returned, or the remaining_count returned is 0.

Try this example in GraphiQL
query SyncFeatureSets {
  sync_feature_sets(
  owners: [
    {
      owner_type: SURVEY,
      sentera_id: "psgyfvi_CO_ve3sAcme_CV_deve_c887ca7df_220127_101410"
    },
    {
      owner_type: FIELD,
      sentera_id: "tyn8u4o_AS_ve3sAcme_CV_deve_c887ca7df_220127_10141"
    },
    {
      owner_type: SURVEY,
      sentera_id: "tyn8u4o_AS_ve3sAcme_CV_deve_c887ca7df_220127_10142"
    }
  ],
  content_hashes: [
    "gX05Ku+op69EerYJ",
    "gX05Ku+op69EerYK",
    "gX05Ku+op69EerYL"
  ]
  ) {
  upserted {
    content_hash
    created_at
    created_by {
      sentera_id
    }
    sentera_id
    ... on FeatureSet {
      type
      owner {
        owner_type
        sentera_id
      }
    }
  },
  deleted {
    sentera_id
    content_hash
  }
  failed {
    key
    message
    details
  }
  }
}

{
  "data": {
  "sync_feature_sets": {
    "upserted": [
      {
        "content_hash": "J8augxRWPkGoy0tZ",
        "created_at": "2022-01-27T17:19:58Z",
        "created_by": {
          "sentera_id": "76yy0v0_US_ve3sAcme_CV_deve_c887ca7df_220127_101410"
        },
        "sentera_id": "y9ziiln_FS_ve3sAcme_CV_deve_c887ca7df_220127_111958",
        "type": "FLIGHT_LOG",
        "owner": {
          "owner_type": "SURVEY",
          "sentera_id": "psgyfvi_CO_ve3sAcme_CV_deve_c887ca7df_220127_101410"
        }
      },
      {
        "content_hash": "3M7XmZWwYgxvjfa/",
        "created_at": "2022-01-27T17:25:52Z",
        "created_by": {
          "sentera_id": "76yy0v0_US_ve3sAcme_CV_deve_c887ca7df_220127_101410"
        },
        "sentera_id": "qwztrfo_FS_ve3sAcme_CV_deve_c887ca7df_220127_112552",
        "type": "FLIGHT_LOG",
        "feature_set_owner": {
          "owner_type": "SURVEY",
          "sentera_id": "psgyfvi_CO_ve3sAcme_CV_deve_c887ca7df_220127_101410"
        }
      },
      {
        "content_hash": "Ue5rg6ht+nbeg5f7",
        "created_at": "2022-01-27T17:26:34Z",
        "created_by": {
          "sentera_id": "76yy0v0_US_ve3sAcme_CV_deve_c887ca7df_220127_101410"
        },
        "sentera_id": "mhmu6j2_FS_ve3sAcme_CV_deve_c887ca7df_220127_112634",
        "type": "FLIGHT_LOG",
        "feature_set_owner": {
          "owner_type": "FIELD",
          "sentera_id": "tyn8u4o_AS_ve3sAcme_CV_deve_c887ca7df_220127_101410"
        }
      }
    ],
    "deleted": [
      {
        "sentera_id": "x7gvgb8_FS_ve3sAcme_CV_deve_c887ca7df_220127_112216",
        "content_hash": "kgLniNT8IAjdD8x5"
      }
    ],
    "failed": [
      {
        "key": "invalid_object",
        "message": "Invalid owner",
        "details": {
          "owner_type": "SURVEY",
          "sentera_id": "tyn8u4o_AS_ve3sAcme_CV_deve_c887ca7df_220127_10142"
        }
      }
    ]
  }
  }
}