Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove ?import from query, so .[ext]$ checks will pass (#786)
- Loading branch information
1 parent
237b48c
commit 8213446
Showing
8 changed files
with
102 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "@vitest/graphql", | ||
"private": true, | ||
"files": [ | ||
"dist", | ||
"types" | ||
], | ||
"scripts": { | ||
"coverage": "vitest run --coverage", | ||
"dev": "vite", | ||
"test": "vitest", | ||
"test:ui": "vitest --ui" | ||
}, | ||
"dependencies": { | ||
"@rollup/plugin-graphql": "^1.1.0", | ||
"graphql": "^16.3.0" | ||
}, | ||
"devDependencies": { | ||
"@vitest/ui": "latest", | ||
"vite": "latest", | ||
"vitest": "latest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fragment CurrentUserFields on User { | ||
id | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#import "./Fragment.gql" | ||
|
||
query Foo { | ||
currentUser { | ||
...CurrentUserFields | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import QUERY from './Query.gql' | ||
|
||
export function getQuery() { | ||
return QUERY | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { expect, test } from 'vitest' | ||
import { getQuery } from '../src/query' | ||
|
||
test('query is defined', () => { | ||
expect(getQuery()).toBeDefined() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/// <reference types="vitest" /> | ||
|
||
import { defineConfig } from 'vite' | ||
import graphql from '@rollup/plugin-graphql' | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [graphql()], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.