Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ NEW: global stores - no query stores by default #852

Merged
merged 14 commits into from
Jan 31, 2023
Prev Previous commit
fix tests
  • Loading branch information
AlecAivazis committed Jan 30, 2023
commit 1c8343dd0b377be14c3240a0788b94fdb6aa23d3
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ test('global fragment type', async function () {
test('no fragment', async function () {
const docs = [`fragment TestFragment1 on User { id }`, `fragment TestFragment2 on User { id }`]

const { plugin_root } = await pipeline_test(docs, {
const { pluginRoot } = await pipeline_test(docs, {
plugins: {
'houdini-svelte': {},
'houdini-plugin-svelte-global-stores': {
Expand All @@ -71,7 +71,7 @@ test('no fragment', async function () {
})

const contents = await fs.readFile(
path.join(global_stores_directory(plugin_root), 'TestFragment1.js')
path.join(global_stores_directory(pluginRoot), 'TestFragment1.js')
)

// parse the contents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test('no mutation', async function () {
`mutation TestMutation2 { updateUser { id } }`,
]

const { plugin_root } = await pipeline_test(docs, {
const { pluginRoot } = await pipeline_test(docs, {
plugins: {
'houdini-svelte': {},
'houdini-plugin-svelte-global-stores': {
Expand All @@ -55,7 +55,7 @@ test('no mutation', async function () {
})

const contents = await fs.readFile(
path.join(global_stores_directory(plugin_root), 'TestMutation1.js')
path.join(global_stores_directory(pluginRoot), 'TestMutation1.js')
)

// parse the contents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ test('change prefix to ""', async function () {
})

const contents = await fs.readFile(
path.join(global_stores_directory(plugin_root), 'TestQuery.js')
path.join(global_stores_directory(pluginRoot), 'TestQuery.js')
)

// parse the contents
Expand All @@ -69,7 +69,7 @@ test('change prefix to ""', async function () {
test('no query', async function () {
const docs = [`query TestQuery { version }`]

const { plugin_root } = await pipeline_test(docs, {
const { pluginRoot } = await pipeline_test(docs, {
plugins: {
'houdini-svelte': {},
'houdini-plugin-svelte-global-stores': {
Expand All @@ -79,7 +79,7 @@ test('no query', async function () {
})

const contents = await fs.readFile(
path.join(global_stores_directory(plugin_root), 'TestQuery.js')
path.join(global_stores_directory(pluginRoot), 'TestQuery.js')
)

// parse the contents
Expand All @@ -94,7 +94,7 @@ test('no query', async function () {
test('all', async function () {
const docs = [`query TestQuery { version }`]

const { plugin_root } = await pipeline_test(docs, {
const { pluginRoot } = await pipeline_test(docs, {
plugins: {
'houdini-svelte': {},
'houdini-plugin-svelte-global-stores': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test('no subscription', async function () {
`subscription TestSubscription2 { newUser { user { id } } }`,
]

const { plugin_root } = await pipeline_test(docs, {
const { pluginRoot } = await pipeline_test(docs, {
plugins: {
'houdini-svelte': {},
'houdini-plugin-svelte-global-stores': {
Expand All @@ -57,7 +57,7 @@ test('no subscription', async function () {
})

const contents = await fs.readFile(
path.join(global_stores_directory(plugin_root), 'TestSubscription1.js')
path.join(global_stores_directory(pluginRoot), 'TestSubscription1.js')
)

// parse the contents
Expand Down
1 change: 0 additions & 1 deletion packages/houdini/src/codegen/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ export async function runPipeline(config: Config, docs: Document[]) {
docs
)
} catch (e) {
console.log(e)
error = e as Error
}

Expand Down