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

fix: re-introduce allowed extensions #1668

Merged
merged 1 commit into from
Sep 20, 2020
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
fix: re-introduce allowed extensions
  • Loading branch information
acao committed Sep 20, 2020
commit 45d97fa77d277d7a6ecce5e00eeed06b54bebd8f
15 changes: 14 additions & 1 deletion packages/graphql-language-service-server/src/parseDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,20 @@ import { findGraphQLTags, DEFAULT_TAGS } from './findGraphQLTags';

export const DEFAULT_SUPPORTED_EXTENSIONS = ['.js', '.ts', '.jsx', '.tsx'];

export const DEFAULT_SUPPORTED_GRAPHQL_EXTENSIONS = ['.graphql'];
/**
* .graphql is the officially reccomended extension for graphql files
*
* .gql and .graphqls are included for compatibility for commonly used extensions
*
* GQL is a registered trademark of Google, and refers to Google Query Language.
* GraphQL Foundation does *not* recommend using this extension or acronym for
* referring to GraphQL.
*/
export const DEFAULT_SUPPORTED_GRAPHQL_EXTENSIONS = [
'.graphql',
'.graphqls',
'.gql',
];

/**
* Helper functions to perform requested services from client/server.
Expand Down