Skip to content

Problem running in ESM module #132

@wolfy1339

Description

@wolfy1339

It seems that this package doesn't like to be run under ESM

import graphql from "github-openapi-graphql-query";

const QUERY = `
  query($version: String) {
    endpoints(version: $version, ghecCompatibilityMode: true) {
      url
      triggersNotification
    }
  }
`;

const {
  data: { endpoints },
} = await graphql(QUERY, {
  version,
});

Results in TypeError: Cannot read properties of null (reading 'endpoints')

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions