How it works by rules?

legacy feature

By default (useServerTypes by default always is true) it expects server on http://127.0.0.1:8000/graphql and generates types based on types provided by this one. If some primitive type in not provided by server, it generates the type based on naming rule. If the server doesn't exists, it returns warning about an server unavailability and generates types purely based on naming rules. By default the rules look so:

rules = {
   string: ['Name', 'Title', 'Date', 'Time'],    // endsWith
   bool: ['is'],                                 // startsWith
   number: ['Id', 'Count', 'Sum']                // endsWith
}	

source:

export const GET_DIALOGS_INIT = gql`
   query profileInfo {
      users {
         username,
            firstName
      },
      dialogs{
         id,
         title
      }
   }
`;

results:

export type profileInfo = {
   users: Array<{
      username: string,
      firstName: string,
   }>,
   dialogs: Array<{
      id: number,
      title: string,
   }>,
};

usefull links:

PS: