title: IdentityServer4, IResourceStore.GetAllResources()
body: <p>I am looking at building a class implementing the IdentityServer <code>IResourceStore</code> interface. My goal is to serve <code>IdentityResource</code> and <code>ApiResource</code> collections as defined in a custom repository.</p>
  
  <p>Ideally, I will receive requests for these resources and respond with the subset relevant to the query. In short: You only get what you ask for.</p>
  
  <p>The <code>GetAllResources()</code>method makes me leery: Is IdentityServer actually requiring that I pull the entire set of my Identity and API resources from my repository and make this available? At this point I have no idea how large those collections will grow, or the cost of pulling them from the repository.</p>
  
  <p>What are the consequences of simply responding with a null or empty lists of resources?</p>
  
  <p>-S</p>