Skip to content

Commit

Permalink
chore: added utm source & medium on playground url
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulmathur16 committed May 21, 2024
1 parent 71e789e commit fc0ad3f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/cli/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pub mod server_config;
pub use http_server::Server;

use self::server_config::ServerConfig;
use crate::cli::command::VERSION;

fn log_launch(sc: &ServerConfig) {
let addr = sc.addr().to_string();
Expand All @@ -16,6 +17,15 @@ fn log_launch(sc: &ServerConfig) {
);

let url = sc.graphiql_url();
let url = format!("https://tailcall.run/playground/?u={}/graphql", url);
let utm_source = if VERSION.eq("0.1.0-dev") {
"tailcall-debug"
} else {
"tailcall-release"

Check warning on line 23 in src/cli/server/mod.rs

View check run for this annotation

Codecov / codecov/patch

src/cli/server/mod.rs#L23

Added line #L23 was not covered by tests
};
let utm_medium = "server";
let url = format!(
"https://tailcall.run/playground/?u={}/graphql&utm_source={}&utm_medium={}",
url, utm_source, utm_medium
);
tracing::info!("🌍 Playground: {}", url);
}

0 comments on commit fc0ad3f

Please sign in to comment.