Skip to content
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

task (3): Integrating the S3 upload logic with the GraphQL resolver #2

Merged
merged 2 commits into from Jul 4, 2021

Conversation

bensooraj
Copy link
Owner

S3 Engine offloads the audio upload task from the GraphQL resolver.
The idea being, the client should never be held up for any upload or processing tasks.

Ideally, the mobile client will upload the asset/audio directly to S3 using a signed URL, saving us network bandwidth, CPU time and a better overall experience for the user.

Sample mutation for uploading an audio short:

mutation($audio_file: Upload!) {
  audioshortCreate(
    audioshort: {
      title: "sample  title 2"
      description: "sample description 2"
      creator_id: 2
      category: "hello"
      audio_file_url: "dummy.com"
      audio_file: $audio_file
    }
  ) {
    id
    title
    audio_file_url
    creator {
      id
      name
    }
  }
}

Altair client UI screenshot:
Screen Shot 2021-07-04 at 12 34 34 PM

The idea being, the client should never be held up for any upload or processing tasks.

Ideally the mobile client will upload the asset/audio directly to S3 using a signed URL, saving us network bandwidth, CPU time and better overall experience for the user.

However, as a self-contained backend system I am handling this here.
Client can now upload an audio short via the GraphQL Client
@bensooraj bensooraj merged commit a756be2 into main Jul 4, 2021
@bensooraj bensooraj deleted the 3_s3engine branch July 4, 2021 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant