<commit_before>import React from 'react'
import { View, Text } from 'react-native'
import gql from 'graphql-tag'
import { graphql } from 'react-apollo'

const RepoOwnerProfile = ({
  data,
  navigation: {
    state: {
      params: { username }
    }
  }
}) => {
console.log(data)
return <View><Text> Profile @{username}</Text></View>

}

const getUserProfile = gql`
  query getUserProfile($login:String!){
    user(login: $login) {
      name
      bio
      avatarUrl
      followers {
        totalCount
      }
      starredRepositories {
        totalCount
      }
      following{
        totalCount
      }
      repositories{
        totalCount
      }
    }
  }`

// Execute a GraphQL query and makes the results
// available on the `data` prop of our wrapped component
export default graphql(getUserProfile, {
    // 'username' is available to us on the navigation prop --> see our router navigation options
    // then make `graphql` compute query variable from that prop
    options: ({ navigation: { state: { params: { username }}} }) => ({ variables: { login: username } }), 
    notifyOnNetworkStatusChange: true
})(RepoOwnerProfile)<commit_msg>handle organization users in query issue#8<commit_after>import React from 'react'
import { View, Text } from 'react-native'
import gql from 'graphql-tag'
import { graphql } from 'react-apollo'

const RepoOwnerProfile = ({
  data,
  navigation: {
    state: {
      params: { username }
    }
  }
}) => {
console.log(data)
return <View><Text> Profile @{username}</Text></View>

}

const getUserProfile = gql`
  query getUserProfile($login: String!){
    organization(login: $login){
      name
      repositories{
        totalCount
      }
      avatarUrl
    }
    user(login: $login) {
      name
      bio
      avatarUrl
      followers {
        totalCount
      }
      starredRepositories {
        totalCount
      }
      following{
        totalCount
      }
      repositories{
        totalCount
      }
    }
  }`

// Execute a GraphQL query and makes the results
// available on the `data` prop of our wrapped component
export default graphql(getUserProfile, {
    // 'username' is available to us on the navigation prop --> see our router navigation options
    // then make `graphql` compute query variable from that prop
    options: ({ navigation: { state: { params: { username }}} }) => ({ variables: { login: username } }), 
    notifyOnNetworkStatusChange: true
})(RepoOwnerProfile)
{'fraction_non_alphanumeric': 0.10759236703207471, 'fraction_numerical': 0.0004060089321965083, 'mean_word_length': 2.6503703703703705, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2972742', 'n_tokens_mistral': 709, 'n_tokens_neox': 706, 'n_words': 213}