GraphQL: old vs. new naming

Hello! :slight_smile:

Since I noticed yesterday, that queries like stream(){} vs project(){} are not equivalent and just offering old and new naming “for convenience”, but rather seem to be completely separate queries, I noticed something else:

There doesn’t seem to be a projects{} query (analog to the existing streams{}) … Is that correct?
How would I get (e.g.) a list of all available project IDs?

Or maybe more general: Is this “new naming”-part of the GraphQL API currently in the making, so I just have to wait? Maybe to spare you with more questions like that. :smiley:

1 Like

This was picked up as the 2.18 connectors team migrated to full support of the new web app urls. It has been logged as an omission.

1 Like

Not sure if I understand that correctly. Is this omission intentionally?

it has been logged as an omission to address - but given that the Streams query exists, it is not yet a critical issue

Ah, OK. Thanks!
Yes, currently it’s not a real problem. Just haven’t be sure how final the currrent queries are meant.

Hi @samberger

You can query for projects using the activeUser query like so

query User($projectsLimit : Int!) {
  activeUser {
    projects(limit: $projectsLimit) {
      totalCount
	  items {
		id
		name
		description
		visibility
		allowPublicComments
		role
		createdAt
		updatedAt
		sourceApps
      }
    }
  }
}

This will return all projects for the current user (up-to the specified limit)
Hopefully this is a sufficient equivalent to the old streams query.

See our graphql schema for more.

Is there any other functionality you are missing from the old API?

3 Likes

Hello @Jedd !

Seems exactly like I waslooking for … just at a different place. :slight_smile:
(At least I was always using the “top level” streams query and not the one under activeUser.)
Thanks!!

2 Likes

Hi again! :slight_smile:

Quick question … with the old naming’s queries one could query any object by its ID under stream. We can’t find anything corresponding under project or version.

grafik

Will this be added, or will there be a new way for querying objects? Or do we miss something?

Thanks in advance! :slight_smile:

1 Like

We haven’t ported that one over (yet). It’s safe to keep using the deprecated endpoint under stream for now - we don’t have any plans to remove it :slight_smile:

3 Likes

@dimitrie allright, thanks! :slight_smile:

1 Like