Create repository via GraphQL #24395
-
From here - https://platform.github.community/t/schema-request-create-repository-and-get-repository-contents/1833, creating a repo via GraphQL was not yet supported. The last update on that thread was Feb 8, 2018, and since the community has moved platforms. Is there any update if create repository is now supported in GraphQL? I do not see a createRepository mutation in the documentation but perhaps there is another method. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
Hi @craigmilhiser, Thanks for asking! You are correct, there is not currently a method for creating repositories using the GraphQL API. To create a repository, you will still need to use the Create a repository v3 API endpoint. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I would suggest placing this information directly on the v4 documentation. It would save a lot of time. More generally, if there were some statement regarding the up-to-dated-ness of the documented schema, that would be great. In particular, I would hope that the documentation would be autogenereated whenever a change goes live, but that might be easier said than done. |
Beta Was this translation helpful? Give feedback.
-
Hi @nathanzook, As we’re always trying to make GitHub friendlier and more approachable, I appreciate that recommendation. I will pass that on to our documentation team for consideration. Thanks! |
Beta Was this translation helpful? Give feedback.
-
@that-pat when will it be possible to create a repository via the v4 API? |
Beta Was this translation helpful? Give feedback.
-
You can now create a new repository using the following mutation: https://developer.github.com/v4/mutation/createrepository/ |
Beta Was this translation helpful? Give feedback.
Hi @craigmilhiser,
Thanks for asking! You are correct, there is not currently a method for creating repositories using the GraphQL API. To create a repository, you will still need to use the Create a repository v3 API endpoint.
Thanks!