Skip to content

Support for.graphql/yaml schemas #259

@arthens

Description

@arthens

We are writing a client for a backend that only provides provides schema.graphql (extracted using https://github.com/graphcool/graphql-cli ) and no schema.json, but if we try to use this schema with apollo-codegen we get a parse error

> apollo-codegen generate src/**/*.graphql --schema schema.graphql --target typescript --output schema.ts

(function (exports, require, module, __filename, __dirname) { schema {
                                                                     ^
SyntaxError: Unexpected token {

Does apollo-codegen only support JSON schemas? Any plan to support .graphql schemas in future?

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