Skip to content

Instantly share code, notes, and snippets.

@brettjashford
Last active July 20, 2018 20:51
Show Gist options
  • Save brettjashford/5a285f8d4e23490c958f8a870507d10b to your computer and use it in GitHub Desktop.
Save brettjashford/5a285f8d4e23490c958f8a870507d10b to your computer and use it in GitHub Desktop.

breaking graphql changes from conversations/solr v3 endpoint

will only affect conversationsSolr query and fields that use tags on ConversationType

conversationSolr query no longer takes $currentUserId argument. instead of passing a user id and only receving tags and tag counts for that user, both seller and buyer tags will always be returned.

conversationsSolr.metadata fields have moved to conversationsSolr.facets under buyerTags/sellerTags.

tag related fields on ConversationType have moved to the corresponding ConversationMemberType (including orderStatusLabel)

example query:

{
  viewer {
    conversationsSolr(first: 15, showInactiveUsers: "Y", queryTemplate: "inbox", sellerId: "f_8518") {
      facets {
        sellerTags {
          archived
          sellerResponseRequired
          unanswered
          unread
          starred
          activePrivateOffer
          activeHold
        }
      }
      edges {
        node {
          originalSeller {
            tags {
              name
            }
            hasUnreadTag
            hasUnansweredTag
            hasArchivedTag
            hasStarredTag
            hasActivePrivateOfferTag
            hasShipmentQuoteTag
            hasActiveHoldTag
            hasResponseRequiredTag
            orderStatusLabel
          }
        }
      }
    }
  }
}

note: i deleted this mobile query in graphql so i could deploy my breaking changes https://github.com/brettjashford/dibs-graphql/commit/1072fc8bcb961bf5f163f50cb31597120840398d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment