Add graphql docs
That would be grade. So that it can be used in the other Service.
Hey @micmine, the structure is viewable here https://github.com/traggo/server/blob/master/schema.graphql I think most of the stuff is self explanatory.
Hey @micmine, the structure is viewable here https://github.com/traggo/server/blob/master/schema.graphql I think most of the stuff is self explanatory.
~~I'm not understanding how to build the mutation to login to the APIs, could you provide an example?~~
I eventually managed to get the token 🚀, can't say I completely understand how to use GraphQL 😅
mutation{
login(username: "admin", pass: "admin", deviceName: "postman", cookie: true, type: NoExpiry ){
token
}
}
Glad to hear this, so it all works fine now? You probably can inspect the browser requests when you do something inside the ui.
You probably can inspect the browser requests when you do something inside the ui.
Indeed.
One thing wasn't as I expected it. The login route returns a token, I expected it to be needed as an Authorization header" Bearer token" instead I made it work as a cookie value. Is this intended?
Yeah, this is one way, another one would be via "Authorization: traggo TOKEN", traggo should probably be changed to bearer (:. See https://github.com/traggo/server/blob/master/auth/middleware.go#L83
Hello, Thanks for the app. I really like how it respects the zen of minimalism. I'm not very good at Graphql. Just wanted to make sure if I can do some personal customization for myself via python and Graph ql. Thanks.
@Shahin-rmz yeah, this should be possible. You can find GraphQL python clients here: https://graphql.org/code/#python-client
So I want to make a client for linux and android, which gets my tasks from nextcloud tasks app and set the projectand task tags inside traggo automatically. And I just press play button on the client.
And after some minutes, send me a push notification to do.pomodoro style job.
Is it good idea or useless complication?
I'd say it is a good idea, if it solves one of your problems (:.
Sorry for not responding. I am using traggo again. I have tied to use your API spec, but it does not seem to be correctly formatted. When i try to use it in my program it fails to load the file.
error: Failed to generate GraphQLQuery impl: Query parser error: query parse error: Parse error at 1:1
Unexpected `enum[Name]`
Expected `{`, `query`, `mutation`, `subscription` or `fragment`
I am using this client: https://github.com/graphql-rust/graphql-client
Please paste the code you are trying to run.
https://github.com/micmine/traggo-jira
#[derive(GraphQLQuery)]
#[graphql(
schema_path = "src/apispecification/schema.graphql",
query_path = "src/apispecification/schema.graphql",
)]
You cannot use the schema as a query, you need to write a query yourself. F.ex a login query looks like this https://github.com/traggo/server/issues/49#issuecomment-766734868