We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7954d02 commit e2dbe1aCopy full SHA for e2dbe1a
1 file changed
src/cortex-cli/src/run_cmd/mime.rs
@@ -34,6 +34,7 @@ pub fn mime_type_from_extension(path: &Path) -> String {
34
"ps1" => "text/x-powershell",
35
"yaml" | "yml" => "text/yaml",
36
"toml" => "text/toml",
37
+ "graphql" | "gql" => "application/graphql",
38
39
// Images
40
"png" => "image/png",
@@ -75,6 +76,14 @@ mod tests {
75
76
mime_type_from_extension(&PathBuf::from("test.json")),
77
"application/json"
78
);
79
+ assert_eq!(
80
+ mime_type_from_extension(&PathBuf::from("schema.graphql")),
81
+ "application/graphql"
82
+ );
83
84
+ mime_type_from_extension(&PathBuf::from("query.gql")),
85
86
87
assert_eq!(
88
mime_type_from_extension(&PathBuf::from("test.png")),
89
"image/png"
0 commit comments