diff --git a/src/cortex-cli/src/run_cmd/mime.rs b/src/cortex-cli/src/run_cmd/mime.rs index 37f1cc90d..51fd9a8b5 100644 --- a/src/cortex-cli/src/run_cmd/mime.rs +++ b/src/cortex-cli/src/run_cmd/mime.rs @@ -34,6 +34,7 @@ pub fn mime_type_from_extension(path: &Path) -> String { "ps1" => "text/x-powershell", "yaml" | "yml" => "text/yaml", "toml" => "text/toml", + "graphql" | "gql" => "application/graphql", // Images "png" => "image/png", @@ -75,6 +76,14 @@ mod tests { mime_type_from_extension(&PathBuf::from("test.json")), "application/json" ); + assert_eq!( + mime_type_from_extension(&PathBuf::from("schema.graphql")), + "application/graphql" + ); + assert_eq!( + mime_type_from_extension(&PathBuf::from("query.gql")), + "application/graphql" + ); assert_eq!( mime_type_from_extension(&PathBuf::from("test.png")), "image/png"