/// Generate the page for GraphIQL
pub fn graphiql_source(graphql_endpoint_url: &str, subscription_endpoint: Option<&str>) -> String {
r#"
Simple GraphiQL Example
"#
.replace("GRAPHQL_URL", graphql_endpoint_url)
.replace(
"GRAPHQL_SUBSCRIPTION_URL",
&match subscription_endpoint {
Some(url) => format!("'{}'", url),
None => "null".to_string(),
},
)
}