query VariantsMenu(
  $featureId: Int,
  $variantName: String,
  $variantTypeIds: [Int!],
  $hasNoVariantType: Boolean
  $first: Int,
  $last: Int,
  $before: String,
  $after: String,
  $sortBy: VariantMenuSort
) {
  variants(
    featureId: $featureId,
    name: $variantName,
    variantTypeIds: $variantTypeIds,
    hasNoVariantType: $hasNoVariantType,
    first: $first,
    last: $last,
    before: $before,
    after: $after,
    sortBy: $sortBy
  ) {
    totalCount
    pageInfo {
      startCursor
      endCursor
      hasPreviousPage
      hasNextPage
    }
    edges{
      cursor
      node {
        ...menuVariant
      }
    }
  }
}

query VariantTypesForFeature(
  $featureId: Int,
) {
  variantTypes(
    featureId: $featureId,
    first: 50
  ) {
    edges {
      node {
        ...menuVariantType
      }
    }
  }
}

fragment menuVariantType on BrowseVariantType {
  id
  name
  link
}

fragment menuVariant on VariantInterface {
  id
  name
  link
  flagged
  deprecated
}
