API V4 and repository hooks problem


#1

Hello,

I’m currently working on repositories and hooks on it.
So I fetch the repository list of a user with the GraphQL API and I save repository ids (for better find after).
I put a hook on repositories but when an event is pushed, I don’t find any project id in the GraphQL way… (Base64/Relay Id).
There is only one way to have the id (Number typed) with the GraphQL API but it is flag as deprecated.
Do you have any idea about having the Relay Id in the hook event ?
I really love GraphQL and I prefer to stay on it instead of switching to the REST API…

Another point is on the GraphQL API itself. I didn’t find a way to install a repository hook with the GraphQL API. Is it normal ?

Thanks in advance for all my questions.

Regards,

Oxyno-zeta


#2

Are you referring to pre-receive Git hooks in Enterprise? Or webhooks? I don’t believe that either are in the GraphQL schema right now. If you have a query you could share, that might help.

We don’t yet have a mutation to create repository hooks, you’ll need to use the REST API for the time being. I’ve marked this issue as a schema request and have added it to our internal tracker to prioritize.