tailcall icon indicating copy to clipboard operation
tailcall copied to clipboard

feat: expose config using an API

Open tusharmath opened this issue 1 year ago • 15 comments

Create a new route /graphql which internally exposes a GraphQL API with the following schema

schema {
  query: Query
}

type Query {
  config: Config!
}

type Mutation {
  patch(config: Config!): Status
}

type Config {
  # .. should be auto-generated from config.rs
}

type Status {
  id: ID #For now should return 1
}

Technical Requirements

  • The port should be configurable via server.admin.port setting
  • Update the configuration such that the port is configurable via a server setting. Enable the admin API only when the port is set.
schema @server(admin: {port: 8001}) {
  query: Query
}

tusharmath avatar Sep 15 '24 19:09 tusharmath

/bounty $200

tusharmath avatar Sep 15 '24 19:09 tusharmath

~~## 💎 $200 bounty • Tailcall Inc.~~

~~### Steps to solve:~~ ~~1. Start working: Comment /attempt #2817 with your implementation plan~~ ~~2. Submit work: Create a pull request including /claim #2817 in the PR body to claim the bounty~~ ~~3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts~~

~~🙏 Thank you for contributing to tailcallhq/tailcall!~~ ~~🧐 Checkout our guidelines before you get started.~~ ~~💵 More about our bounty program.~~

Attempt Started (GMT+0) Solution
🔴 @ssddOnTop Sep 15, 2024, 7:46:17 PM WIP
🔴 @karatakis Sep 20, 2024, 9:47:52 AM WIP
🔴 @EveEdwin Sep 24, 2024, 5:54:43 PM WIP
🔴 @TomBebb Nov 8, 2024, 7:12:51 PM WIP

algora-pbc[bot] avatar Sep 15 '24 19:09 algora-pbc[bot]

/attempt #2817

Algora profile Completed bounties Tech Active attempts Options
@ssddOnTop 76 tailcallhq bounties
Rust, Java,
C & more
Cancel attempt

ssddOnTop avatar Sep 15 '24 19:09 ssddOnTop

@ssddOnTop: Reminder that in 1 days the bounty will become up for grabs, so please submit a pull request before then 🙏

algora-pbc[bot] avatar Sep 16 '24 19:09 algora-pbc[bot]

is there a reason to generate a type Config? Schema types are dynamic and will be different for every config, that's will be hard to fetch actually. Apollo federation just uses String to pass the sdl content

meskill avatar Sep 17 '24 11:09 meskill

The bounty is up for grabs! Everyone is welcome to /attempt #2817 🙌

algora-pbc[bot] avatar Sep 17 '24 19:09 algora-pbc[bot]

Does the provided mutation update the configuration when the Tailcall service is online?

type Mutation {
  patch(config: Config!): Status
}

karatakis avatar Sep 18 '24 07:09 karatakis

/attempt #2817

Algora profile Completed bounties Tech Active attempts Options
@karatakis 2 tailcallhq bounties
Rust, JavaScript,
PHP & more
Cancel attempt

karatakis avatar Sep 20 '24 09:09 karatakis

@karatakis: Reminder that in 1 days the bounty will become up for grabs, so please submit a pull request before then 🙏

algora-pbc[bot] avatar Sep 21 '24 09:09 algora-pbc[bot]

The bounty is up for grabs! Everyone is welcome to /attempt #2817 🙌

algora-pbc[bot] avatar Sep 22 '24 09:09 algora-pbc[bot]

/attempt #2817

Options

EveEdwin avatar Sep 24 '24 17:09 EveEdwin

closing this one in favour of https://github.com/tailcallhq/tailcall/issues/2903

tusharmath avatar Sep 25 '24 02:09 tusharmath

@meskill In general its a good idea to have type-safe APIs, that's the whole point of GraphQL and gRPC, however for now I have changed the requirements in #2903 so that we can build this quickly.

tusharmath avatar Sep 25 '24 02:09 tusharmath

@EveEdwin: Reminder that in 1 days the bounty will become up for grabs, so please submit a pull request before then 🙏

algora-pbc[bot] avatar Sep 25 '24 17:09 algora-pbc[bot]

The bounty is up for grabs! Everyone is welcome to /attempt #2817 🙌

algora-pbc[bot] avatar Sep 26 '24 17:09 algora-pbc[bot]

Action required: Issue inactive for 30 days. Status update or closure in 7 days.

github-actions[bot] avatar Oct 31 '24 10:10 github-actions[bot]

/attempt #2817

Options

TomBebb avatar Nov 08 '24 19:11 TomBebb

@TomBebb: Reminder that in 1 days the bounty will become up for grabs, so please submit a pull request before then 🙏

algora-pbc[bot] avatar Nov 09 '24 19:11 algora-pbc[bot]

The bounty is up for grabs! Everyone is welcome to /attempt #2817 🙌

algora-pbc[bot] avatar Nov 10 '24 19:11 algora-pbc[bot]

@tusharmath - Is the issue still open to work and claim the bounty ?

Rushhaabhhh avatar Nov 26 '24 17:11 Rushhaabhhh

Not right now. We need to do a bit more work after which this can be worked on.

tusharmath avatar Nov 26 '24 17:11 tusharmath

@tusharmath Please let me know once its open to work. Thank you

Rushhaabhhh avatar Nov 26 '24 17:11 Rushhaabhhh

Action required: Issue inactive for 30 days. Status update or closure in 7 days.

github-actions[bot] avatar Dec 26 '24 18:12 github-actions[bot]

Issue closed after 7 days of inactivity.

github-actions[bot] avatar Jan 02 '25 19:01 github-actions[bot]