Skip to content

Instantly share code, notes, and snippets.

@wildseansy
Last active April 6, 2021 16:57
Show Gist options
  • Save wildseansy/1d7bada2a0cb82aadafaa48b579abccd to your computer and use it in GitHub Desktop.
Save wildseansy/1d7bada2a0cb82aadafaa48b579abccd to your computer and use it in GitHub Desktop.
04-06-2021 GraphQL Changes

Can test new changes on https://deploy-preview-22--openfit-programs-qa.netlify.app/graphql

1. Class start & end info now takes a parameter of type ID not String

type Query {
  classStartInfo(_id: ID!, _key: String)
  classEndInfo(_id: ID!, _key: String)
}

2. Program image => image1 in programWithSlug(slug: String) API

program.trainers[].image is now program.trainers[].image1

3. Openfit Class Deprecations

type Query {
  # Use this API for fetching a class with an _id or slug
  openfitClass(_id: ID, slug: String): OpenfitClass @cacheControl(maxAge: 60, scope: PRIVATE)
  
  # Deprecated:
  classWithSlug(slug: String): OpenfitClass @deprecated(reason: "Please use 'openfitClass(slug: $slug)'")
  classWithID(id: String): OpenfitClass @deprecated(reason: "Please use 'openfitClass(_id: $_id)'")
}

4. If you use program.progress, please use program.badge and program.enrollDate instead

type OpenfitProgram {
  #...
  progress: ProgramProgress @deprecated(reason: "Please use 'program.enrollDate' and 'program.badge'")
}

If you have issues, please email sholbert@beachbody.com or message @seansy on Openfit Slack

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