Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

371 B
Raw Blame
import { HoppCollection } from "@hoppscotch/data"
import { stripRefIdReplacer } from "."
import { stripCollectionTreeForStore } from "~/helpers/clientLocalVariables"

export const gqlCollectionsExporter = (gqlCollections: HoppCollection[]) => {
  const stripped = gqlCollections.map(stripCollectionTreeForStore)
  return JSON.stringify(stripped, stripRefIdReplacer, 2)
}