GithubHelp home page GithubHelp logo

Add graphql docs about server HOT 14 OPEN

jmattheis avatar jmattheis commented on August 16, 2024 5
Add graphql docs

from server.

Comments (14)

jmattheis avatar jmattheis commented on August 16, 2024 2

@Shahin-rmz yeah, this should be possible. You can find GraphQL python clients here: https://graphql.org/code/#python-client

from server.

jmattheis avatar jmattheis commented on August 16, 2024 1

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.

from server.

jmattheis avatar jmattheis commented on August 16, 2024 1

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

from server.

jmattheis avatar jmattheis commented on August 16, 2024 1

I'd say it is a good idea, if it solves one of your problems (:.

from server.

emilycares avatar emilycares commented on August 16, 2024

That would be grade. So that it can be used in the other Service.

from server.

maxiride avatar maxiride commented on August 16, 2024

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
    }
}

from server.

jmattheis avatar jmattheis commented on August 16, 2024

Glad to hear this, so it all works fine now? You probably can inspect the browser requests when you do something inside the ui.

from server.

maxiride avatar maxiride commented on August 16, 2024

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?

from server.

Shahin-rmz avatar Shahin-rmz commented on August 16, 2024

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.

from server.

Shahin-rmz avatar Shahin-rmz commented on August 16, 2024

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?

from server.

emilycares avatar emilycares commented on August 16, 2024

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

from server.

jmattheis avatar jmattheis commented on August 16, 2024

Please paste the code you are trying to run.

from server.

emilycares avatar emilycares commented on August 16, 2024

https://github.com/micmine/traggo-jira

from server.

jmattheis avatar jmattheis commented on August 16, 2024
#[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 #49 (comment)

from server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.