Internal API - Invalid Service Name when creating project

Hey Folks, I'm trying to use the API to create a new project. I'm getting an error about an Invalid Service Name. I think this might be because my repo URL is pretty long? The projects do get created, but the graphql response comes back with an error and I'm not able to pull the new project id out of it. Is there any way to work around this? Or to pass in the service name as a variable? Or let me know if my mutation is just formatted wrong The mutation looks like this:
mutation {
projectCreate(
input: {
isPublic: false,
name: "apple-garlic",
repo: {
branch: "main",
fullRepoName: "caret-jake/artifact_64dab1ad-0e50-4ca3-a3d9-372286eca940"
},
}
) {
id
}
}
mutation {
projectCreate(
input: {
isPublic: false,
name: "apple-garlic",
repo: {
branch: "main",
fullRepoName: "caret-jake/artifact_64dab1ad-0e50-4ca3-a3d9-372286eca940"
},
}
) {
id
}
}
I get this error response
{
errors: [
{
message: "Invalid service name",
locations: [
[Object ...]
],
path: [ "projectCreate" ],
extensions: [Object ...],
traceId: "4053368649584985068",
}
],
data: null,
}
{
errors: [
{
message: "Invalid service name",
locations: [
[Object ...]
],
path: [ "projectCreate" ],
extensions: [Object ...],
traceId: "4053368649584985068",
}
],
data: null,
}
Solution:
the service names are derived from the repo name and service names have a limit of 32 characters
Jump to solution
7 Replies
Percy
Percy4mo ago
Project ID: 64dab1ad-0e50-4ca3-a3d9-372286eca940
Jake Colling
Jake CollingOP4mo ago
More detailed logs indicates an internal server error.
Errors encountered:
Error 1:
Message: Invalid service name
Locations: [
{
line: 3,
column: 11,
}
]
Path: [ "projectCreate" ]
Extensions: {
code: "INTERNAL_SERVER_ERROR",
}
Trace ID: 1241376029114976398
{
errors: [
{
message: "Invalid service name",
locations: [
[Object ...]
],
path: [ "projectCreate" ],
extensions: [Object ...],
traceId: "1241376029114976398",
}
],

Errors encountered:
Error 1:
Message: Invalid service name
Locations: [
{
line: 3,
column: 11,
}
]
Path: [ "projectCreate" ]
Extensions: {
code: "INTERNAL_SERVER_ERROR",
}
Trace ID: 1241376029114976398
{
errors: [
{
message: "Invalid service name",
locations: [
[Object ...]
],
path: [ "projectCreate" ],
extensions: [Object ...],
traceId: "1241376029114976398",
}
],

Solution
Brody
Brody4mo ago
the service names are derived from the repo name and service names have a limit of 32 characters
Jake Colling
Jake CollingOP4mo ago
Does there happen to be any way to pass in a service name instead of having it be derived?
Brody
Brody4mo ago
just checked the schema, there isnt unfortunately
Jake Colling
Jake CollingOP4mo ago
Dang okay! Well I'm a big fan of Railway so I'll change other parts of my app to accomodate that! Thanks for the quick response here! Very appreciated!
Brody
Brody4mo ago
no problem!
Want results from more Discord servers?
Add your server