Skip to content

Commit

Permalink
Support '.graphqls' file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
gschulze committed Oct 28, 2024
1 parent fa869ce commit 79bf131
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/houdini/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@ async function loadSchemaFile(schemaPath: string): Promise<graphql.GraphQLSchema
const contents = (await fs.readFile(schemaPath))!

// if the schema points to an sdl file
if (schemaPath.endsWith('gql') || schemaPath.endsWith('graphql')) {
if (schemaPath.endsWith('gql') || schemaPath.endsWith('graphql') || schemaPath.endsWith('graphqls')) {
return graphql.buildSchema(contents)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/houdini/src/lib/introspection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export async function pullSchema(

// Check if the schemapath ends with .gql or .graphql - if so write the schema as string
// Otherwise write the json/introspection
if (schemaPath!.endsWith('gql') || schemaPath!.endsWith('graphql')) {
if (schemaPath!.endsWith('gql') || schemaPath!.endsWith('graphql') || schemaPath.endsWith('graphqls')) {
const schema = graphql.buildClientSchema(jsonSchema)
fileData = graphql.printSchema(graphql.lexicographicSortSchema(schema))
} else {
Expand Down

0 comments on commit 79bf131

Please sign in to comment.