-
Notifications
You must be signed in to change notification settings - Fork 8
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
More examples (poem) #113
Comments
Update: I read through some more of the doc comments for in my handler #[handler]
pub async fn index(
schema: Data<&RealSchema>,
headers: &HeaderMap,
req: GraphQLRequest,
) -> GraphQLResponse {
let mut req = req.0;
if let Some(token) = get_token_from_headers(headers) {
req = req.data(token);
}
req = req.data(ApolloTracingDataExt {
userid: Some("idk what this is".to_string()),
path: Some("/".to_string()),
host: Some("localhost:3000".to_string()),
method: Some(HTTPMethod::POST),
secure: Some(false),
protocol: Some("HTTP/1.1".to_string()),
status_code: Some(200),
client_name: Some("My client_name IDK".to_string()),
client_version: Some("My client_version IDK".to_string()),
});
schema.execute(req).await.into()
} registering ...
.extension(ApolloTracing::new(
"service:My-Graph-8sf1w:_b9JOwqgkFqkRDBhBwTsfA".into(),
"localhost".into(),
"My-Graph-8sf1w@current".into(),
"v1.0.0".into(),
10,
));
register(
"service:My-Graph-8sf1w:_b9JOwqgkFqkRDBhBwTsfA",
&graphql_schema,
"my-graph",
"current",
"1.0.0",
"localhost",
)
.await
.expect("Couldn't register schema with apollo tracing."); And I'm getting the following output in my terminal:
Do you see anything in my configuration that would warrant a 422? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would you mind creating an example of how to use this extension with poem?
I'm not very familiar with tracing and apollo studio, it would be helpful to have some more information on how to get a basic example working locally.
When setting up a new graph on apollo studio they give you this screen:
How can I get this to auto-detect my schema?
Here's some more info that might be helpful:
Versions from Cargo.toml
WIP attempt at creating a new ApolloTracing extension
How do these expected values map to what apollo studio gives me?
Thanks in advance for any help / suggestions you can provide!
The text was updated successfully, but these errors were encountered: