Skip to content

Commit

Permalink
WIP attempting to reproduce #195
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Sep 18, 2020
1 parent d29b692 commit e98f296
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 20 deletions.
28 changes: 8 additions & 20 deletions .github/workflows/test.yml
Expand Up @@ -2,28 +2,16 @@ name: Test
"on":
push:
branches:
- master
- dependabot/npm_and_yarn/**
pull_request:
types:
- opened
- synchronize
- 195/import-error-on-windows
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node_version:
- 10
- 12
- 14
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: "Use Node.js ${{ matrix.node_version }}"
uses: actions/setup-node@v1
- uses: actions/setup-node@v1
with:
node-version: "${{ matrix.node_version }}"
- name: Install
run: npm ci
- name: Test
run: npm test
node-version: 10.19.0
- run: npm ci
- run: node reproduce-195.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions reproduce-195.js
@@ -0,0 +1,18 @@
import { graphql } from "./pkg";

// Azure Function HTTP Trigger entry point
async function run () {
const userToken = process.env.GITHUB_TOKEN
const graphqlWithAuth = graphql.defaults({
headers: {
authorization: `token ${userToken}`,
},
});

const { data } = await graphqlWithAuth(`{
viewer {
login
}
}`);
console.log(data);
}

0 comments on commit e98f296

Please sign in to comment.