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

Add note about acceptable extensions for types of schema file #2059

Merged
merged 1 commit into from
Jan 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/ApolloCodegenLib/ApolloCodegenOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public struct ApolloCodegenOptions {
/// - outputFormat: The `OutputFormat` enum option to use to output generated code.
/// - customScalarFormat: How to handle properties using a custom scalar from the schema.
/// - suppressSwiftMultilineStringLiterals: Don't use multi-line string literals when generating code. Defaults to false.
/// - urlToSchemaFile: The URL to your schema file.
/// - urlToSchemaFile: The URL to your schema file. Accepted file types are `.json` for JSON files, or either `.graphqls` or `.sdl` for Schema Definition Language files.
Copy link
Member

@calvincestari calvincestari Dec 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is .sdl valid, will ApolloCLI recognize that? This will likely change in 1.0 though as the frontend looks specifically for .json otherwise attempts to interpret any file as SDL - here.

Copy link
Member

@calvincestari calvincestari Dec 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still recommended, you could say expected, default extensions though, like this.

/// - downloadTimeout: The maximum time to wait before indicating that the download timed out, in seconds. Defaults to 30 seconds.
public init(codegenEngine: CodeGenerationEngine = .default,
includes: String = "./**/*.graphql",
Expand Down