// eslint-disable-next-line no-undef
module.exports = {
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  plugin: (schema, _documents, _config) => {
    const typeNames = Object.keys(schema.getTypeMap())
      .filter((name) => !name.startsWith("__")) // Filter out built-in types
      .map((name) => `export const ${name} = "${name}";\n`);

    return typeNames.join("");
  },
};
