title: Github GraphQL API find relatedTopic
body: <p>I have been reading documents and videos for more than 8 hours, hundreds, but I have not been able to find, how to search for a certain <strong>topic</strong> it lists the <strong>relatedTopics</strong>, I am working with React and the connection works all right, but that simple list period, someone will have an example to see? Thanks a lot.</p>
  <p>I have this documentation, but it doesn't show any examples of how to use it.
  <a href="https://docs.github.com/en/graphql/reference/objects#topic" rel="nofollow noreferrer">https://docs.github.com/en/graphql/reference/objects#topic</a></p>
  <p>My current query works fine.</p>
  <pre><code>const createQuery = (elements, search) =&gt; gql`{
    search(
      query: &quot;topic:${search} sort:updated-desc&quot;,
      type: REPOSITORY,
      first: ${elements}
    ){
      repositoryCount
      nodes {
        ... on Repository {
          nameWithOwner
          updatedAt
          stargazerCount
          url
        }
      }
    }
  }`;
  </code></pre>