diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 978ad90f..be0c36f9 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -26,6 +26,7 @@ When releasing a new version: - The new `optional: generic` allows using a generic type to represent optionality. See the [documentation](genqlient.yaml) for details. - For schemas with enum values that differ only in casing, it's now possible to disable smart-casing in genqlient.yaml; see the [documentation](genqlient.yaml) for `casing` for details. +- Support .graphqls and .gql file extensions ### Bug fixes: - The presence of negative pointer directives, i.e., `# @genqlient(pointer: false)` are now respected even in the when `optional: pointer` is set in the configuration file. diff --git a/generate/parse.go b/generate/parse.go index 4569f25c..6ef7656b 100644 --- a/generate/parse.go +++ b/generate/parse.go @@ -130,7 +130,7 @@ func getQueries(basedir string, globs StringList) (*ast.QueryDocument, error) { } switch filepath.Ext(filename) { - case ".graphql": + case ".graphql", ".graphqls", ".gql": queryDoc, err := getQueriesFromString(string(text), basedir, filename) if err != nil { return nil, err