[eas-cli] Add Convex integration (eas convex:init)#3575
Draft
[eas-cli] Add Convex integration (eas convex:init)#3575
Conversation
Add a new `convex:init` command that provisions a Convex backend for an Expo project. The CLI talks to the EAS backend (www), which acts as an OAuth proxy to Convex APIs. The command flow: - Checks for existing Convex team connections on the EAS account - Creates a new Convex team if none exists (prompts for region + name) - Sets up a Convex project and deployment - Sends a team invitation to the user's email - Writes CONVEX_DEPLOY_KEY and EXPO_PUBLIC_CONVEX_URL to .env.local Also parameterizes the GraphQL codegen schema URL so it can target a local www server: `GRAPHQL_SCHEMA_URL=http://127.0.0.1:3000/graphql yarn generate-graphql-code`
285cd73 to
3e962e3
Compare
3e962e3 to
73e925f
Compare
douglowder
reviewed
Apr 6, 2026
| @@ -1,5 +1,5 @@ | |||
| overwrite: true | |||
| schema: 'https://staging-api.expo.dev/graphql' | |||
Contributor
There was a problem hiding this comment.
I do wish there were some way that graphql-codegen could use the actual correct Expo API URL in https://github.com/expo/eas-cli/blob/main/packages/eas-cli/src/api.ts#L78
Allow users to specify which email to send the Convex team invite to, with the current user's email suggested as the default. Adds --invite-email flag for non-interactive use.
|
✅ Thank you for adding the changelog entry! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
Expo is integrating with Convex to let users provision a Convex backend directly from the EAS CLI. This enables a streamlined onboarding flow where developers can set up a Convex team, project, and deployment without leaving their terminal or navigating through OAuth flows.
How
New command:
eas convex:initSets up Convex for an Expo project in one command. The CLI talks to the EAS backend (www), which acts as an OAuth proxy to Convex APIs.
Flow:
createConvexTeamConnectionmutationsetupConvexProjectmutationsendConvexTeamInviteCONVEX_DEPLOY_KEYandEXPO_PUBLIC_CONVEX_URLto.env.local(merges with existing content)Flags:
--region— Convex deployment region (aws-us-east-1,aws-eu-west-1)--team-name— Name for the new Convex team--project-name— Name for the Convex project--non-interactive— Uses sensible defaults without promptingAll optional flags are prompted for interactively when omitted (unless
--non-interactive).Codegen parameterization
The
generate-graphql-codenpm script now supports aGRAPHQL_SCHEMA_URLenv var so we can generate types from a local www server:Falls back to
https://staging-api.expo.dev/graphql(same as before).New files
src/commands/convex/init.tssrc/commands/convex/__tests__/init.test.tssrc/commands/convex/E2E_TESTING.mdsrc/graphql/types/ConvexTeamConnection.tssrc/graphql/queries/ConvexQuery.tssrc/graphql/mutations/ConvexMutation.tsModified files
graphql-codegen.ymlpackage.jsonconvexoclif topicgraphql.schema.jsonsrc/graphql/generated.tsTest Plan
Unit tests (21 passing)
Covers: team creation flow, existing connections, project name resolution, team invites (including non-fatal failures and robot actors),
.env.localmerging/overwriting, non-interactive mode, error handling.E2E testing
See
src/commands/convex/E2E_TESTING.mdfor the full manual testing guide with 11 scenarios. Summary:Typecheck / lint