Skip to content

Config schemaPath doesn't support multiple files #1735

Description

@hibnico

Describe the bug

We were using Houdini 1.5.1. We tried to upgrade to Houdini 2.0.8.
We have in our config:

/** @type {import('houdini').ConfigFile} */
const config = {
	schemaPath: './graphql/schema/*/*.graphqls',
}

Starting the dev server with npm run dev fails with:

-- internal error during schema @ houdini-core -----------------------------
could not open schema file


error when starting dev server:
PluginHookError: Failed to call houdini-core                                                                                                                                                                                                                                                                                                                                         
    at WebSocket.<anonymous> (file:///Users/nlalevee/dev/myapp-front/node_modules/houdini/build/lib/codegen.js:417:33)                                                                                                                                                                                                                                                
    at WebSocket.emit (node:events:524:28)                                                                                                                                                                                                                                                                                                                                           
    at Receiver.receiverOnMessage (/Users/nlalevee/dev/myapp-front/node_modules/ws/lib/websocket.js:1239:20)                                                                                                                                                                                                                                                          
    at Receiver.emit (node:events:524:28)                                                                                                                                                                                                                                                                                                                                            
    at Receiver.dataMessage (/Users/nlalevee/dev/myapp-front/node_modules/ws/lib/receiver.js:633:14)                                                                                                                                                                                                                                                                  
    at Receiver.getData (/Users/nlalevee/dev/myapp-front/node_modules/ws/lib/receiver.js:532:10)                                                                                                                                                                                                                                                                      
    at Receiver.startLoop (/Users/nlalevee/dev/myapp-front/node_modules/ws/lib/receiver.js:190:16)                                                                                                                                                                                                                                                                    
    at Receiver._write (/Users/nlalevee/dev/myapp-front/node_modules/ws/lib/receiver.js:117:10)                                                                                                                                                                                                                                                                       
    at writeOrBuffer (node:internal/streams/writable:572:12)                                                                                                                                                                                                                                                                                                                         
    at _write (node:internal/streams/writable:501:10) {                                                                                                                                                                                                                                                                                                                              
  plugin: 'houdini-core',                                                                                                                                                                                                                                                                                                                                                            
  hook: 'Schema',                                                                                                                                                                                                                                                                                                                                                                    
  errors: [ { message: 'could not open schema file' } ],                                                                                                                                                                                                                                                                                                                             
  alreadyLogged: true                                                                                                                                                                                                                                                                                                                                                                
}

I checked again the documentation at https://houdinigraphql.com/svelte/v3/core/config/
It still states:

schemaPath (optional, default: "./schema.graphql"): the path to the static representation of your schema, can be a glob pointing to multiple files

To understand the actual issue, which file was tried to be read and how, I had to look up the source code. And indeed the code just read a file from schemaPath : https://github.com/HoudiniGraphql/houdini/blob/a8de8ddcdba679c29d9323dafdfe0130195b10ba/packages/houdini-core/plugin/schema.go#L33C20-L33C24

Reproduction

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions